Skip to content

Instantly share code, notes, and snippets.

View dongri's full-sized avatar
🌴
On vacation

Dongri Jin dongri

🌴
On vacation
View GitHub Profile
set-window-option -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g mouse-resize-pane on
set-option -g mouse-select-window on
set-option -g default-shell /bin/bash
bind-key j page-up
bind-key ; page-down
# Fix LSOpenURLsWithRole() error on OS X. Requires reattach-to-user-namespace
@dongri
dongri / app.go
Created August 18, 2014 10:38 — forked from Bochenski/app.go
package main
import (
"github.com/codegangsta/negroni"
"github.com/gorilla/context"
"github.com/unrolled/render"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"log"
"net/http"
#!/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
@dongri
dongri / gist:8571116
Created January 23, 2014 01:30
.ebextensions
010_packages.config
packages:
yum:
gcc: []
make: []
openssl-devel: []
libxml2: []
libxml2-devel: []
git: []
ImageMagick: []
packages:
yum:
git: []
gcc: []
make: []
openssl-devel: []
commands:
00-add-home-variable:
command: sed -i 's/function error_exit/export HOME=\/root\n\nfunction error_exit/' /opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh
container_commands:
def DongriServer
PRIORITY_HIGH = 1
PRIORITY_NORMAL = 2
PRIORITY_LOW = 3
me = Dongri.new
def request(user, job)
/**
* Simply compares two string version values.
*
* Example:
* versionCompare('1.1', '1.2') => -1
* versionCompare('1.1', '1.1') => 0
* versionCompare('1.2', '1.1') => 1
* versionCompare('2.23.3', '2.22.3') => 1
*
* Returns:
mkdir -p ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoffeeScript
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/CoffeeScript
curl -O https://raw.github.com/jashkenas/coffee-script-tmbundle/master/Syntaxes/CoffeeScript.tmLanguage
curl -O https://raw.github.com/jashkenas/coffee-script-tmbundle/master/Preferences/CoffeeScript.tmPreferences
@dongri
dongri / callme.php
Created January 29, 2013 04:58 — forked from suin/callme.php
<?php
$stdin = file_get_contents('php://stdin');
$data = json_decode($stdin, true);
// var_dump($data);
if ( is_array($data) === false )
{