Skip to content
master
Switch branches/tags
Code

Latest commit

* Make clicking "Unknown" language do nothing.

#97

* Implement user cache using embedded H2.

* Separate caching to its own service

#110

* Change UserProfile to be not Serializable

* Fix copy-paste errors.

* Replace Jackson with Gson which reduced boilerplate code by a bit.

* Introduce an extension function

* Remove unnecessary JsonDeserializer class.

Instead, I decided to use a simple TypeAdapter in order to deserialize number into java.util.Date.

* Switch back to Jackson as deserializer.

* Add warning suppression.

* Replace redundant creation of ObjectMapper.

* Replace LocalDateTime with Instant.

* Prevent multiple invocations of generateUserProfile.

* Cache by lazy.

* Remove unnecessary JSON deserialization from lookUpInCache.

* Prevent NPE.

* Update src/main/kotlin/app/CacheService.kt

Co-authored-by: Sidd <iProdigy@users.noreply.github.com>

* Revert "Prevent multiple invocations of generateUserProfile."

This reverts commit 8306d92

* Remove unnecessary custom deserializer.

* Rename function.

UserService#lookUpInCache → selectJsonFromDb

* Reduce invocations of CacheService#selectJsonFromDb.

* Extract functions from duplicate code.

* Update src/main/kotlin/app/CacheService.kt

Co-authored-by: Sidd <iProdigy@users.noreply.github.com>

* Remove unnecessary class UserNotLoadableException.

* Remove unnecessary lazy initialization.

* Change id values to lowercase in DB.

follow-up change to 80154a0

* Change data type of `timestamp` from 'TIMESTAMP WITH TIME ZONE' to 'TIMESTAMP'.

* Use HikariCP.

* Update src/main/kotlin/app/util/HikariCpDataSource.kt

Co-authored-by: Sidd <iProdigy@users.noreply.github.com>

* Replace string concatenation with multi-line string

* Replace uses of magic numbers

* Remove intermediate local variable

* Make CacheService have `HikariCpDataSource.connection` as its field

Co-authored-by: Sidd <iProdigy@users.noreply.github.com>
f7488ae

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Dec 10, 2017
Feb 24, 2018
Jul 21, 2019
Jul 21, 2019
Jul 21, 2019

profile-summary-for-github

live at https://profile-summary-for-github.com/

screenshot

screenshot

run locally

  • git clone https://github.com/tipsy/profile-summary-for-github.git
  • cd profile-summary-for-github
  • mvn install
  • java -jar target/profile-summary-for-github-jar-with-dependencies.jar

If no api-token is set, you only get ~50 requests/hour

To run the app with an api-token, first generate a token at https://github.com/settings/tokens, then launch the jar with the token:

  • java -Dapi-tokens=your-token -jar target/profile-summary-for-github-jar-with-dependencies.jar

You can use a comma-separated list of tokens to increase your rate-limit

You can build a profile summary for any GitHub profile using -Dunrestricted=true:

  • java -Dunrestricted=true -jar target/profile-summary-for-github-jar-with-dependencies.jar

You can set when the app should require user-starring by passing free-requests-cutoff Passing 1000 will require the app to require starring if there are less than 1000 requests left:

  • java -Dfree-requests-cutoff=1000 -jar target/profile-summary-for-github-jar-with-dependencies.jar

You can enable Google Tag Manager on your instance by setting gtm-id:

  • java -Dgtm-id=GTM-XXXXXX -jar target/profile-summary-for-github-jar-with-dependencies.jar

run locally with docker

  • git clone https://github.com/tipsy/profile-summary-for-github.git
  • cd profile-summary-for-github
  • docker build -t profile-summary-for-github .
  • docker run -it --rm --name profile-summary-for-github -p 7070:7070 profile-summary-for-github
  • OR with a token docker run -it --rm --name profile-summary-for-github -p 7070:7070 -e "API_TOKENS=mytoken1,mytoken2" profile-summary-for-github
  • browse to http://localhost:7070