Skip to content

Instantly share code, notes, and snippets.

View fizerkhan's full-sized avatar

Fizer Khan (பைசர் கான்) fizerkhan

View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@fizerkhan
fizerkhan / gist:2364466
Created April 12, 2012 03:37
I'd like to double click this td element and have #heythere toggle too
HTML
----
<table class="table table-striped">
<tbody>
<tr class="diary_hour"><!-- Hour Row Start -->
<td class="span1" data-toggle="collapse" data-target="#heythere" title="Got a question? Drop us a line.">
<h4>Click Here</h4>
</td>
<td class="test"> <!-- I'd like to double click this td element and have #heythere toggle too -->
@diurnalist
diurnalist / gist:2364707
Created April 12, 2012 05:06
Lightweight Relation Modeling with Backbone (6)
var Track = Backbone.Model.extend(),
TrackList = Backbone.Collection.extend({
model: Track
}),
Album = Backbone.RelationalModel.extend({
relations: {
trackList: TrackList
}
});​
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@ruturajv
ruturajv / beacon.js
Created April 25, 2012 04:28
node.js web beacon (web bug) serving
http = require('http');
url = require('url');
http.createServer(function(req, res){
var requestURL = url.parse(req.url, true)['pathname'];
if (requestURL == '/log.gif') {
var imgHex = '47494638396101000100800000dbdfef00000021f90401000000002c00000000010001000002024401003b';
var imgBinary = new Buffer(imgHex, 'hex');
res.writeHead(200, {'Content-Type': 'image/gif' });
@danbronsema
danbronsema / responsivemenu.css
Created May 3, 2012 11:02
CSS - Responsive Menu in Bootstrap
@media (max-width: 979px) {
body {
padding-top: 0;
}
.navbar-fixed-top {
position: static;
margin-bottom: 18px;
}
.navbar-fixed-top .navbar-inner {
padding: 5px;
@hurjas
hurjas / timestamp.js
Created May 11, 2012 15:35 — forked from jonkemp/timestamp.js
Print out a nicely formatted timestamp in JavaScript.
/**
* Return a timestamp with the format "m/d/yy h:MM:ss TT"
* @type {Date}
*/
function timeStamp() {
// Create a date object with the current time
var now = new Date();
// Create an array with the current month, day and time
@midnightcodr
midnightcodr / sample_contact_us_form_bootstrap_styling.html
Created May 21, 2012 03:36
A sample contact form using twitter bootstrap styling
<form class="well span8">
<div class="row">
<div class="span3">
<label>First Name</label>
<input type="text" class="span3" placeholder="Your First Name">
<label>Last Name</label>
<input type="text" class="span3" placeholder="Your Last Name">
<label>Email Address</label>
<div class="input-prepend">
<span class="add-on"><i class="icon-envelope"></i></span><input type="text" id="inputIcon" class="span2" style="width:233px" placeholder="Your email address">
@otanistudio
otanistudio / chat-frontend.js
Created June 2, 2012 04:45 — forked from martinsik/chat-frontend.js
Node.js chat server, with the frontend changed to use BackboneJS
/*global $, Backbone, window, console, WebSocket, _ */
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var $content = $('#content')
, $input = $('#input')
, $status = $('#status')
// my color assigned by the server