Skip to content

Instantly share code, notes, and snippets.

View xuxiaodong's full-sized avatar

Xiaodong Xu xuxiaodong

View GitHub Profile
extends perl
## ROUTE DEFINITIONS
snippet get "GET route" !b
get '/${1}' => sub {
${2:${VISUAL:...;}}
};
endsnippet
extends perl
## ROUTE DEFINITIONS
snippet get "GET route" !b
get '/${1}' => sub {
${2:${VISUAL:...;}}
};
endsnippet
gems = %x(gem list --no-version).split(/\n/).join(' ')
puts gems
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
Requirements for Linux ( DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS" )
NOTE: 'ruby' represents Matz's Ruby Interpreter (MRI) (1.8.X, 1.9.X)
This is the *original* / standard Ruby Language Interpreter
'ree' represents Ruby Enterprise Edition
'rbx' represents Rubinius
require 'open-uri'
require 'nokogiri'
base_url = 'https://github.com'
url = "#{base_url}/explore"
page = Nokogiri::HTML(open(url))
(1 .. 5).to_a.each do |i|
xpath = "//ol/li[#{i}]/h3/a[2]"
repo = page.search(xpath)
" Vim color file
" Converted from Textmate theme Tomorrow Night using Coloration v0.3.2 (http://github.com/sickill/coloration)
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif