Skip to content

Instantly share code, notes, and snippets.

View kevjose's full-sized avatar
👨‍💻
zinging

kevin kevjose

👨‍💻
zinging
View GitHub Profile
@umanghome
umanghome / index.js
Created April 29, 2021 09:29
Do we have vaccination slots for 25 year olds yet?
/**
* run `npm init -y`
* run `npm i node-fetch`
* run `node index.js`
* turn Slack notifications on
*
* Get cowinUrl from the DevTools' network tab
* Get authorization string from the Request Headers as the value of authorization header of the network request for cowinUrl. If this expires, the script will stop working. You'll have to log in again and get a new value for this.
*/
@kevjose
kevjose / express-route-structure.js
Last active December 2, 2016 04:38
basic routing that can be used for routing in express js
/*
* Let server be running at http://localhost:3000
*/
// server.js
var index = require('./routes/index');
var users = require('./routes/users');
app.use('/', index);
app.use('/users', users);//this will prefix all user routes with users. Namespace effect.
@splosch
splosch / md5_device_fingerprint.js
Last active March 6, 2018 20:50
Browser and device fingerprinting - a MD5 checksum generator to identify a device-browser-combination
(function(window, document, JSON){
"use strict";
var SEP = '|', ua, opera, ie;
/*
* Collect Browser & Device Data
*/
var Collector = {
/*
* MD5 Checksum calculation
*/
@pyk
pyk / active-record-migration-expert.md
Last active August 2, 2021 09:20
become active record migration expert (Rails 4.0.2)

become active record migration expert (Rails 4.0.2)

workflow:

create model

$ rails g model NameOfModel
    invoke  active_record
    create    db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb