Skip to content

Instantly share code, notes, and snippets.

View number_of_commits_for_a_user.sql
--
-- Most unique commits from Jan 2016 to March 2017 for `mesaugat`
-- Change `mesaugat` to any other username to get number of commits for that username
--
-- https://bigquery.cloud.google.com/savedquery/39178653524:9a10947dbf8f429da6dd5193592d2d61
--
SELECT
u.login AS login,
u.location AS location,
u.country_code AS country_code,
View most_followed_github_users_from_nepal.sql
--
-- Most followed users as of March 2017
-- If the user has been unfollowed it still counts as a follow
--
-- https://bigquery.cloud.google.com/savedquery/39178653524:3c9bf26cf2054e50a53d325f869e129a
--
SELECT
u.login AS login,
u.location AS location,
count(f.follower_id) AS num_followers
View most_unique_commits_per_user_from_nepal.sql
--
-- Most unique commits per user from Jan 2016 to March 2017
--
-- https://bigquery.cloud.google.com/savedquery/39178653524:e4b670a18035460792b0554983dde6ad
--
SELECT
u.login AS login,
u.location AS location,
COUNT(c.id) AS num_commits
FROM
View most_commits_per_user_in_javascript_projects_from_nepal.sql
--
-- Most commits per user in JavaScript projects from Jan 2016 to March 2017
-- Change JavaScript to any other language for other metrics
--
-- https://bigquery.cloud.google.com/savedquery/39178653524:00053da8b5534c24881a08d034de9bae
--
SELECT
u.login AS login,
u.location AS location,
COUNT(c.id) AS num_commits
View most_commits_per_user_from_nepal.sql
--
-- Most commits per user from Jan 2016 to March 2017
-- More than one project can share the same commits if one is a fork of the other
--
-- https://bigquery.cloud.google.com/savedquery/39178653524:a0ff27f9332c4ef2b03ecea1c8dbd3e2
--
SELECT
u.login AS login,
u.location AS location,
COUNT(c.id) AS num_commits
@mesaugat
mesaugat / tcin-airtable.js
Last active Mar 26, 2017
Script to fetch all companies and their information from https://github.com/mesaugat/tech-companies-in-nepal and push it to Airtable.
View tcin-airtable.js
/**
* Script to fetch all companies and their information from https://github.com/mesaugat/tech-companies-in-nepal and push it to Airtable.
*
* Some inspiration from https://github.com/poteto/hww-api
*
* I know the script doesn't look good but hey, it works!
*
* Requires node > 7.6
* Run: node --harmony <filename>
*/
@mesaugat
mesaugat / jwt.js
Last active Mar 13, 2017
Generate a JWT
View jwt.js
/**
* npm install jsonwebtoken
*
* node --harmony jwt.js
*/
const jsonwebtoken = require('jsonwebtoken');
const expiresIn = '1m';
const object = { name: 'WTF' };
@mesaugat
mesaugat / promise-promise_promise-async-series-callback-then-promise-promise.js
Last active Mar 22, 2017
promise_promise_promise_async_series_callback_then_promise_promise.js
View promise-promise_promise-async-series-callback-then-promise-promise.js
const async = require('async');
const axios = require('axios');
const CronJob = require('cron').CronJob;
let courseList = [
{courseId: 3},
{courseId: 4},
{courseId: 5},
{courseId: 6}
];