Coder Social home page Coder Social logo

gh-widget's Introduction

Hi, this is just a little hack to make your self a nice Github Contribution Widget.

place the following code anywhere you want to place this widget

  <div id="github-widget" data-user="your-github-username" data-display="pop_repos,calendar"></div>
  <script src="https://gh-widget.oyanglul.us/index.js"></script>

then BOOM! ๐ŸŽ† ![](Screen Shot.png)

Config

  • username: put your github username in data-user attribute
  • display: put any of pop_repos calendar in data-display attribute,split by ,

Try

Live Example

How this works

  • Q:Where is the server?
    • A: backend code is just a gist file https://gist.github.com/jcouyang/aec5210828043d5505bd which just simple scrape your github profile page and provide a nice json file. and I've create gist.github.com.ru (ru is for ruby) as a my little service deployed in heroku, which can run ruby code in gist.github.com. it's quite handy than AWS lambda if you don't care anyone can see your source code. So it's the only server ever needed.
  • Q: How can you handle gh-widget.oyanglul.us without a server.
    • A: github custom 404 page which redirect any path to my 404.html, and that html have a script to handle the path as parameter. for example, https://gh-widget.oyanglul.us/jcouyang will actually toes to 404.html

gh-widget's People

Contributors

andrenanninga avatar jcouyang avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.