Skip to content

Instantly share code, notes, and snippets.

View praveenvvstgy's full-sized avatar

Praveen Gowda I V praveenvvstgy

View GitHub Profile
@addyosmani
addyosmani / Readme.md
Created May 6, 2013 20:55 — forked from NV/Readme.md
stopBefore.js

stopBefore.js

2min screencast

Examples

stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')
@wycats
wycats / jsonapi.md
Created May 2, 2013 04:11
Ember APIs

JSON API

There are two JSON API styles:

  • The ID Style
  • The URL Style

The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.

The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.

@wycats
wycats / jsonapi.md
Created May 1, 2013 00:58
Ember APIs

JSON API

There are two JSON API styles:

  • The ID Style
  • The URL Style

The ID style is the easiest to get started with, but requires that your clients be able to guess the URLs for related documents. It also locks your API into a particular URL structure, which may become a problem as your API grows.

The URL style requires less guessing on the client side, and makes clients more resilient to API changes, but is trickier to use with relationships and compound documents.

@dirkk0
dirkk0 / gist:4530915
Last active December 11, 2015 02:29
Installing Telescope ( https://github.com/SachaG/Telescope)
# https://github.com/SachaG/Telescope
########################
# it should be
sudo apt-get install git npm
curl https://install.meteor.com | /bin/sh
sudo npm install -g meteorite
@jaywilliams
jaywilliams / Twilight Terminal Theme.mdown
Created August 1, 2012 16:41
Twilight Theme Terminal Colors

Twilight Theme Terminal Colors

Based on the timeless TextMate theme.

Basic Colors

Foreground:     #FEFFD3

Background: #141414

@underhilllabs
underhilllabs / gist:2869824
Created June 4, 2012 17:51
Server alias from Paul Irish
#!/usr/bin/env python
function server() {
local port="${1:-8000}"
open "http://localhost:${port}/"
python SimpleHTTPServer "$port"
}
@hakre
hakre / gist:2397187
Created April 16, 2012 09:06
Contextual user-friendly time and dates with PHP
<?php
/**
* @link http://snipt.net/pkarl/pkarlcom-contextualtime/
* @link http://pkarl.com/articles/contextual-user-friendly-time-and-dates-php/
*/
function contextualTime($small_ts, $large_ts=false) {
if(!$large_ts) $large_ts = time();
$n = $large_ts - $small_ts;
if($n <= 1) return 'less than 1 second ago';
if($n < (60)) return $n . ' seconds ago';
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'