Skip to content

Show dynamic Images on our GitHub profile special repository

Notifications You must be signed in to change notification settings

Aniket965/Dynamic-Github-Profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 

Repository files navigation

Dynamic Github Profile

Refresh this page to see different Images

What?

we can show dynamic Images on our github profile special repository githubhandle/githubhandle by creating an API which returns different images

example:

using unsplash random images

https://source.unsplash.com/random/800x400

will show a random image like this

Ideas

we can use this and create various different kind of profiles, some examples of that are: -

  • Based on Time, we can create something like dynamic wallpapers in mac
  • Based on Festivals, we can greet our profile visitor and make something special on special occasions
  • Based on Birthdays, we can let our visitors know about our birthdays and create special effects on our profile
  • Based on Daily Wallpapers or Quotes, you can show a daily quote on your github profile
  • Based on News that you follow
  • Based On random Thing that you like
    • example https://source.unsplash.com/random/800x400?star
  • Based on Your Latest Instagram post

How?

for creating dynamic effect you have to host a server which returns your content

Code Snippet for creating route in Express.js

app.get("/unsplash", (req, res) => {
  request("https://source.unsplash.com/random/800x200")
    .on("response", response => {
      response.headers['Cache-Control'] = 'max-age=0, no-cache, no-store, must-revalidate'
    })
    .pipe(res);
})
  • Note :- set Cache-Control: max-age=0, no-cache, no-store, must-revalidate otherwise github will cache images for too long

More Ideas? Contact Twitter - @aniket965as

About

Show dynamic Images on our GitHub profile special repository

Topics

Resources

Stars

Watchers

Forks