Skip to content

Instantly share code, notes, and snippets.

View mdaisuke's full-sized avatar
:octocat:
write code

mdaisuke mdaisuke

:octocat:
write code
View GitHub Profile
@dchiji
dchiji / jit-bf.c
Created May 27, 2009 09:57
JIT Brainfuck
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define DEBUG
#ifdef DEBUG
unsigned char *mem;
int mem_size;
#endif
#!/bin/sh
set -u
set -e
# Example init script, this can be used with nginx, too,
# since nginx and unicorn accept the same signals
# Feel free to change any of the following variables for your app:
APP_ROOT=/home/deploy/public_html/rm/current
PID=$APP_ROOT/tmp/pids/unicorn.pid
ENV=production
anonymous
anonymous / bfjit.cpp
Created August 10, 2010 22:45
#include <algorithm>
#include <chrono>
#include <cstdint>
#include <deque>
#include <functional>
#include <forward_list>
#include <iterator>
#include <iostream>
#include <memory>
#include <limits>
@mdaisuke
mdaisuke / gist:846247
Created February 27, 2011 15:12
nvm(node version manager)
git clone git://github.com/creationix/nvm.git ~/.nvm
source ~/.nvm/nvm.sh
nvm alias default v0.4.1
# write down in .bashrc
[[ -s "$HOME/.nvm/nvm.sh" ]] && . "$HOME/.nvm/nvm.sh"
"" plugins
call pathogen#runtime_append_all_bundles()
"let g:neocomplcache_enable_at_startup = 1
"" settings
filetype plugin indent on
syntax enable
set backspace=eol,indent,start
set ignorecase
set smartcase
@powdahound
powdahound / hipchat_bot.js
Created April 25, 2011 18:35
Basic XMPP bot example for HipChat using node.js
// Basic XMPP bot example for HipChat using node.js
// To use:
// 1. Set config variables
// 2. Run `node hipchat_bot.js`
// 3. Send a message like "!weather 94085" in the room with the bot
var request = require('request'); // github.com/mikeal/request
var sys = require('sys');
var util = require('util');
@mattn
mattn / aasocket.go
Created July 5, 2011 02:40
Go round the face
package main
import (
"http"
"websocket"
"syscall"
)
var aa = []string{
"(´・ω・`)",
anonymous
anonymous / install_node.sh
Created July 21, 2011 01:14
#!/bin/sh
cd /Users/mdaisuke
mkdir local
cd ./local
wget http://nodejs.org/dist/v0.5.1/node-v0.5.1.tar.gz
tar zxf ./node-v0.5.1.tar.gz
cd node-v0.5.1
./configure --prefix=/Users/mdaisuke/local/node
autodetach on
bell_msg "^G"
defkanji utf-8
defencoding utf-8
encoding utf-8 utf-8
defscrollback 10000
escape ^Jj
startup_message off
vbell off
caption always "%{= wb} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wk} [%l] %{=b wb}%y/%m/%d(%D) %{=b wm}%c"
$ git config --global github.user username
$ git config --global github.token toooken