Skip to content

Instantly share code, notes, and snippets.

View racklin's full-sized avatar

Rack Lin (阿土伯) racklin

View GitHub Profile
@racklin
racklin / index.js
Last active August 29, 2015 14:10 — forked from edokeh/index.js
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@racklin
racklin / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@racklin
racklin / gitfiti.sh
Last active August 29, 2015 14:10
KP gitfiti
KP = [
[0,0,4,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,4,0,0,0],
[0,0,4,0,0,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,0,0,4,0,4,0,4,0],
[4,4,4,4,4,0,0,0,0,4,0,0,0,0,4,4,0,0,4,4,0,0,0,4,0,4,0,0],
[0,4,4,4,0,0,4,4,0,4,0,0,0,0,4,4,0,0,4,4,0,0,4,4,0,4,4,0],
[4,0,4,0,4,0,4,4,0,4,0,0,0,0,4,4,4,4,0,0,0,0,0,0,4,0,0,0],
[0,0,4,0,0,0,0,0,4,4,0,0,0,0,4,4,0,0,0,0,0,0,0,0,4,0,0,0],
[0,0,4,0,0,0,0,0,0,4,0,0,0,0,4,4,0,0,0,0,0,0,0,0,4,0,0,0]]
BOX_NAME=vagrant-build
BASE_DIR="`pwd`/machines"
BOX_DIR="${BASE_DIR}/${BOX_NAME}"
mkdir -p ${BASE_DIR}
VBoxManage createvm --name "${BOX_NAME}" --ostype RedHat_64 --basefolder ${BASE_DIR}
VBoxManage registervm "${BOX_DIR}/${BOX_NAME}.vbox"
mkdir -p tmp
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@racklin
racklin / Makefile
Created November 6, 2013 13:00 — forked from hintjens/Makefile
all: srv.c
g++ srv.c /home/eerihug/dev/BakkaLinux/root/usr/local/lib/libzmq.a -lpthread -lrt -o srv
g++ cli.c /home/eerihug/dev/BakkaLinux/root/usr/local/lib/libzmq.a -lpthread -lrt -o cli
clean:
rm cli
rm srv
" Vunble Bundles Settings {{{"{{{
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle required!
Bundle 'gmarik/vundle'
" }}}"}}}
@racklin
racklin / .ctags
Created August 31, 2013 04:37 — forked from jesstelford/.ctags
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/(^|=[ \t])*class ([A-Za-z_][A-Za-z0-9_]+\.)*([A-Za-z_][A-Za-z0-9_]+)( extends ([A-Za-z][A-Za-z0-9_.]*)+)?$/\3/c,class/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?@?(([A-Za-z][A-Za-z0-9_.]*)+):.*[-=]>.*$/\3/m,method/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/v,variable/
--regex-coffee=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/f,field/
--regex-coffee=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/f,static field/
--regex-coffee=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/f,field/
--regex-coffee=/((constructor|initialize):[ \t]*\()@(([A-Za-z][A-Za-z0-9_.]*)+)([ \t]*=[ \t]*[^,)]+)?/\3/f,field/
@racklin
racklin / zmq_init.cpp
Created March 25, 2013 08:08
zeromq's zmq_init.cpp include fun
#include <string.h>
#include "zmq_init.hpp"
#include "transient_session.hpp"
#include "named_session.hpp"
#include "socket_base.hpp"
#include "zmq_engine.hpp"
#include "io_thread.hpp"
#include "session.hpp"
#include "uuid.hpp"
@racklin
racklin / test.html
Created November 12, 2012 08:29
test
<html>
<body>
<a href="t:dispatch?controller=Main&command=shutdown"><h1>TEST</h1></a>
<body>
</html>