Coder Social home page Coder Social logo

github-counter's Introduction

github-counter

No Maintenance Intended

Generate your own "hits" (How idiots track success) badge to your repositories and track page views.

How it works

If an user look at your README or other markdown file, that include the badge, a request to the counter application with the repository key is sent. The application saves the page-view in the related redis database and returns the updated badge.

Requirements and Install

For the easiest install you need a docker'able hosting plattform or service. Personal i'm using DigitalOcean for this.

Alternately you can only take the application part.

Installation steps with docker and docker-compose:

  • Install dependencies via Composer for the application
$ cd app
$ composer install --no-dev
  • Set a password for redis here
  • Update the nginx vhost file (server_name)
  • Add certs for your domain here (private.key and ssl-bundle.crt)
  • (optional) Update redis.conf (password is set automatically)

After this just run the following commands:

$ docker-compose build

and

$ docker-compose up -d

Demo

Look at the top of this document and reload. :-)

Debugging and customizing

If something went wrong you can first set the debug mode for the Silex application.

$app['debug'] = true;

And if you want some more fancy badges update the svg part in the application.

<svg xmlns="http://www.w3.org/2000/svg" width="95" height="20">
...
</svg>

ToDo

  • add a data-container for redis database

github-counter's People

Contributors

tommy-muehle avatar

Stargazers

 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.