Skip to content

Instantly share code, notes, and snippets.

View nikhilkesari's full-sized avatar
:shipit:
Focusing

Nikhil S Kesari nikhilkesari

:shipit:
Focusing
View GitHub Profile
{
"api": {
"CredentialUserData": {
"__compat": {
"mdn_url": "https://developer.mozilla.org/docs/Web/API/CredentialUserData",
"support": {
"chrome": {
"version_added": "60"
},
"chrome_android": {
@nikhilkesari
nikhilkesari / app.js
Created November 7, 2017 06:16
Lazy load using IntersectionObserver
import '../css/main.css';
console.log("message");
(function() {
var observer;
var index = 0;
var options = {
root: null,
rootMargin: '0px',
threshold: 0
}
@nikhilkesari
nikhilkesari / http-response-interceptor.js
Created August 15, 2016 02:43 — forked from idosela/http-response-interceptor.js
Sample code for ng-conf 2014
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) {
$httpProvider.responseInterceptors.push([
'$q', '$templateCache', 'activeProfile',
function($q, $templateCache, activeProfile) {
// Keep track which HTML templates have already been modified.
var modifiedTemplates = {};
// Tests if there are any keep/omit attributes.
var HAS_FLAGS_EXP = /data-(keep|omit)/;
@nikhilkesari
nikhilkesari / tmux-cheatsheet.markdown
Created January 19, 2016 04:43 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
/**
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns.
**/
// Constructor.
var Interface = function (name, methods) {
if (arguments.length != 2) {
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2.");
}
this.name = name;
/**
Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns.
**/
// Constructor.
var Interface = function (name, methods) {
if (arguments.length != 2) {
throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2.");
}
this.name = name;