Skip to content

Instantly share code, notes, and snippets.

View ehteshamkafeel's full-sized avatar

Ehtesham Kafeel ehteshamkafeel

  • Abu Dhabi, United Arab Emirates
View GitHub Profile
@ehteshamkafeel
ehteshamkafeel / curl.md
Created February 6, 2014 21:21 — forked from btoone/curl.md

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@ehteshamkafeel
ehteshamkafeel / deepExtend.js
Last active January 2, 2016 06:38
Deep Extends the objects by making deep copies. Does not change any of objects in arguments.
// Checks if the given argument is an object
var isObject = function (obj) {
return obj === Object(obj);
};
// Extends the destination object with source object recrsively
var deepExtend = function (dest, source) {
var clone = {};
for (var key in source) {

Javascript #router. Features:

  • Just 70 lines of code.
  • Router scope can be bound to any object (default window); just change first parameter
  • Triggers custom DOM (Level 2) events on window.document.
  • IE 9+, FF, and Webkit based browsers [Tested only in Chrome and FF].