Skip to content

Instantly share code, notes, and snippets.

/**
* merge sort
**/
var arr = [8,7,9,30,13,8,99,124, 5];
//var arr = [1,10,9];
var newArr = [];
var ii = 0;
@zhiyelee
zhiyelee / getip.php
Created March 31, 2012 02:41
twtter get ip
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Get IP</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?php
$domains = array('api.twitter.com', 'twitter.com');
@zhiyelee
zhiyelee / post-receive.sh
Created March 5, 2012 10:18
hooks/post-receive.sh
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a she ll session *as a function*
GEM_PATH=$GEM_PATH:/usr/local/rvm/gems/ruby-1.9.2-p290
PATH=$PATH:/usr/local/rvm/gems/ruby-1.9.2-p290/bin
GIT_WORK_TREE=$HOME/octopress/ git checkout -f
cd $HOME/octopress/
bundle install
bundle exec rake generate