Skip to content

Instantly share code, notes, and snippets.

View xuxiaodong's full-sized avatar

Xiaodong Xu xuxiaodong

View GitHub Profile
" 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
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)
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
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
gems = %x(gem list --no-version).split(/\n/).join(' ')
puts gems
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
extends perl
## ROUTE DEFINITIONS
snippet get "GET route" !b
get '/${1}' => sub {
${2:${VISUAL:...;}}
};
endsnippet
---
# Tasks to install required packages for awx
#- name: install ubuntu awx apt repository
# template: src=awx_repo.j2 dest=/etc/apt/sources.list.d/awx_repo.list
- name: install python-pip package for ubuntu 12.04
apt: name=python-pip
when: ansible_lsb.codename == "precise"
---
# Tasks for configuring PostgreSQL server.
#- name: init postgresql
# command: service postgresql initdb creates=/var/lib/pgsql/data/PG_VERSION
# when: ansible_distribution != "Ubuntu"
# tags: postgresql
- name: update postgresql authentication settings
template: src=pg_hba.conf.j2 dest={{pg_hba_location}} owner=postgres