Skip to content

Instantly share code, notes, and snippets.

View yasvg's full-sized avatar

Vikas Gourav yasvg

View GitHub Profile
@yasvg
yasvg / debounce-version.js
Created June 3, 2019 10:31
File comparing actual debounced version of click event handler
//Actual Event Handler
function eventHandlerFn(){
//do something
}
//Debounced Version
var timeoutFn;
function debouncedFn() {
clearTimeout(timeoutFn);
@yasvg
yasvg / commit-message-guidelines.md
Created November 2, 2018 04:53 — forked from robertpainsi/commit-message-guidelines.md
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@yasvg
yasvg / gist:6b8fdeb80043eeef157182fa30233b2b
Created May 14, 2018 12:10 — forked from mhawksey/gist:1442370
Google Apps Script to read JSON and write to sheet
function getJSON(aUrl,sheetname) {
//var sheetname = "test";
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json";
var response = UrlFetchApp.fetch(aUrl); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var data = dataAll.value.items;
for (i in data){
data[i].pubDate = new Date(data[i].pubDate);
data[i].start = data[i].pubDate;
}