Skip to content

Instantly share code, notes, and snippets.

View ravinsinghd's full-sized avatar

Ravin Singh D ravinsinghd

View GitHub Profile
@ravinsinghd
ravinsinghd / Procfile
Created July 25, 2018 18:06 — forked from jordansissel/Procfile
Jenkins on Heroku
# Only listen on http; disable ajp and https
web: java -jar jenkins.war --httpPort=$PORT --ajp13Port=-1 --httpsPort=-1
@ravinsinghd
ravinsinghd / serviceworker.js
Created January 25, 2018 18:54 — forked from kosamari/serviceworker.js
cache index.html using Service Worker
/*
* CHALLANGE:
* Cache `index.html` file using service worker.
*
* This bit of code is included in <script> tag of index.html
* if (navigator.serviceWorker) {
* navigator.serviceWorker.register('serviceworker.js', {scope: '/'})
* }
*
*/
@ravinsinghd
ravinsinghd / gist:c538401ddbed9e20a089ceac6899ae96
Created June 21, 2016 02:51 — forked from angeldm/gist:4663739
Detecting Font size using Tesseract+Leptonica
/*
http://pastebin.com/0dV84hBa
g++ -o test_font_features test_font_features-2.cpp -ltesseract
*/
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
int main() {
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();