Skip to content

Instantly share code, notes, and snippets.

@jaseemabid
jaseemabid / jquerify.js
Created August 5, 2011 17:26
Run this line of js in your browser addressbar to add jQuery into the page you are viewing
javascript:var s=document.createElement('script');s.setAttribute('src','http://code.jquery.com/jquery.js');document.getElementsByTagName('body')[0].appendChild(s);
@jaseemabid
jaseemabid / sources.list
Created August 5, 2011 21:56
NITC Ubuntu 10.04 campus mirror configuration file. Replace /etc/apt/sources.list with this file
# NITC Campus mirror
deb http://192.168.40.97/ubuntu lucid main universe multiverse restricted
deb http://192.168.40.97/ubuntu lucid-updates main universe multiverse restricted
deb http://192.168.40.97/ubuntu lucid-security main universe multiverse restricted
@jaseemabid
jaseemabid / objects.js
Created August 23, 2011 13:37 — forked from kaaes/objects.js
ECMA5 object cheatsheet
/**
* Object descriptor
**/
var a = {
prop1 : 14
}
var descriptorObj1 = Object.getOwnPropertyDescriptor(a, 'prop1');
@jaseemabid
jaseemabid / simple_this_ex.js
Created August 23, 2011 14:06 — forked from kaaes/simple_this_ex.js
basic example of this object
var a, b, c, d, e;
a = function(obj) {
return this;
}
// when you call the function in 'function form' 'this' is window object
a(); // window
@jaseemabid
jaseemabid / gist:1168230
Created August 24, 2011 14:48
HTML special characters
Bullet (•) •
Cent sign (¢) ¢
Copyright sign (©) ©
Degree sign (°) °
Em dash (—) —
Euro symbol (€) €
Heart symbol (♥) ♥
Inverted exclamation (¡) ¡
Inverted question (¿) ¿
Non-breaking space  
@jaseemabid
jaseemabid / gist:1173998
Created August 26, 2011 18:06
Installing postgresql in ubuntu
sudo apt-get install postgresql
sudo -u postgres psql postgres
\password postgres
sudo -u postgres createuser --superuser $USER
sudo -u postgres psql
postgres=# \password $USER
@jaseemabid
jaseemabid / git for dummies.md
Created September 11, 2011 20:54
Git for dummies

Git for dummies

As the source code is handled by the version control system Git, it's useful to know some features used.

Submodules

The repository uses submodules, which normally are handled directly by the Makefile, but sometimes you want to be able to work with them manually.

@jaseemabid
jaseemabid / ReadMe.md
Created October 16, 2011 22:16 — forked from netroy/ReadMe.md
Simplest Static Webserver in Node.JS

Just install connect from npm. Run this in a directory that you'll like to serve static content from. To run on a specific port set ENV "StaticPort"

@jaseemabid
jaseemabid / gist:1316930
Created October 26, 2011 16:39
Private variables in JavaScript
console.log("Private variables in JavaScript");
var a = (function(){
return obj = {
pub : 'public data',
getSecret : function() {
var secret = 'my secret';
return secret;
}
};
@jaseemabid
jaseemabid / git tutorials.md
Last active March 24, 2024 00:07 — forked from netroy/git tutorials.md
Awesome git tutorials I am finding here and there