Skip to content

Instantly share code, notes, and snippets.

View taarushv's full-sized avatar

Taarush Vemulapalli taarushv

View GitHub Profile
/* Kinda like Python's defaultdict, but for JS*/
function defDict(type) {
var dict = {};
return {
get: function (key) {
if (!dict[key]) {
dict[key] = type.constructor();
}
return dict[key];
@kanakiyajay
kanakiyajay / app.js
Created February 25, 2014 16:39
Ajax forms using express.js and jQuery utilizing mysql and node-js
var mysql = require("mysql"),
express = require("express"),
app = express();
var connection = mysql.createConnection({
host : "localhost",
user : "root",
password : "",
database : "node"
});
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 31, 2024 22:29
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname