Skip to content

Instantly share code, notes, and snippets.

View kamrankhan54's full-sized avatar

Kamran Khan kamrankhan54

  • Grainger Global
  • London
View GitHub Profile
@kamrankhan54
kamrankhan54 / gs-exporter.js
Last active September 10, 2023 12:45
Google Spreadsheets Export to JSON
import gs from 'fast-gs';
import axios from 'axios';
// Needed to throttle data coming in from Google spreadsheets
const RateLimiter = require('limiter').RateLimiter;
const limiter = new RateLimiter(50, 'second');
// Access details for worksheet
const googleKey = '';
const googleSheetId = ;
@kamrankhan54
kamrankhan54 / gist:5876ad1f5ddb11345fa9
Last active August 29, 2015 14:16
Snippets for Dev'ing
This will reload any changes you make in the service that you watch -
bosco cdn -t summary -w the-thing-you-want-to-watch
This will let you stop a service -
pm2 stop service-name
This will list all the services which are currently running/stopped -
pm2 list
This will restart a service -
@kamrankhan54
kamrankhan54 / error.sublime-snippet
Created January 28, 2015 13:30
sublime snippet - callback error handler
<snippet>
<content><![CDATA[
if (err) { return console.error(err); }
]]></content>
<tabTrigger>ce</tabTrigger>
<scope>source.js</scope>
<description>Insert callback error check</description>
</snippet>