Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Usage:
# ./git_move.sh git@repo_site.com:/my_repo.git origin/folder/path/ /destination/repo/path/ new/folder/path/
repo=$1
folder=$2
dest_repo=$3
dest_folder=$4
clone_folder='__git_clone_repo__'
c_cyan=`tput setaf 4`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_yellow=`tput setaf 3`
c_sgr0=`tput sgr0`
c_bold=`tput bold`
bldblu='\e[1;34m' # Blue
current_git_branch ()
def print_right_half_triangle(num_of_rows)
count = 0
last_count = 0
for i in 1..num_of_rows
for j in 1..i
last_count = count + j
print last_count.to_s + " "
end
puts "\n"
count = last_count
$ env LD_LIBRARY_PATH=/opt/local/lib jruby -J-d64 asm_test.rb
disassembly:
mov rax, 0xdeadbeef
ret
function returns: deadbeef
@shihgianlee
shihgianlee / gist:1095486
Created July 20, 2011 17:52
RedBridge for Nokogiri
package canna;
/**
* modified after yokolet - http://gist.github.com/424212
*/
import java.util.Arrays;
import java.util.List;
import org.jruby.embed.LocalContextScope;