start new:
tmux
start new with session name:
tmux new -s myname
This is gist. | |
There are many like it, but this one is mine. | |
It is my life. | |
I must master it as I must master my life. | |
Without me gist is useless. | |
Without gist, I am useless. |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
// Dependency resolution, adapted from https://gist.github.com/1232505/f16308bc14966c8d003c2686b1c258ec41303c1f | |
function resolve(graph) { | |
var sorted = [], // sorted list of IDs ( returned value ) | |
visited = {}; // hash: id of already visited node => true | |
// 2. topological sort | |
Object.keys(graph).forEach(function visit(name, ancestors) { | |
if (!Array.isArray(ancestors)) ancestors = []; | |
ancestors.push(name); | |
visited[name] = true; |
/** | |
* Simple JavaScript tokenizer (not a full parser!!!) | |
* | |
* Portions taken from Narcissus by Brendan Eich <[email protected]>. | |
*/ | |
/*jshint evil: true, regexdash: false, regexp: false */ | |
var KEYWORDS = [ | |
'break', |
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html | |
MyEntity: | |
type: entity | |
repositoryClass: MyRepositoryClass | |
table: my_entity | |
namedQueries: | |
all: "SELECT u FROM __CLASS__ u" | |
# Class-Table-Inheritance |
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger ([email protected]) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
#include "game.h" | |
#define MAXR 1000000000 | |
#define MAXC 1000000000 | |
#include <assert.h> | |
#include <stddef.h> | |
long long gcd2(long long X, long long Y) { | |
if(X == 0 || Y == 0) { |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void computeLPSarray(char *pat, int M, int *lps) | |
{ | |
int len = 0; //lenght of previous longest prefix suffix | |
int i ; | |
lps[0] = 0 ; //lps[0] is always 0 |
let g:ctrlp_buffer_func = { 'enter': 'CtrlPMappings' } | |
function! CtrlPMappings() | |
nnoremap <buffer> <silent> <C-@> :call <sid>DeleteBuffer()<cr> | |
endfunction | |
function! s:DeleteBuffer() | |
let path = fnamemodify(getline('.')[2:], ':p') | |
let bufn = matchstr(path, '\v\d+\ze\*No Name') | |
exec "bd" bufn ==# "" ? path : bufn |