This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
# -------------------- | |
# 最新修订日期:2011-10-14 | |
# -------------------- | |
# 0. Rails | |
# -------------------- | |
gem 'rack', '1.3.3' #修正rake报错<http://stackoverflow.com/question/7624661/> | |
gem 'rails', '3.1.3' | |
# Gems used only for assets and not required | |
# in production environments by default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PHP_SCRIPT=/usr/bin/php-fastcgi | |
FASTCGI_USER=www-data | |
FASTCGI_GROUP=www-data | |
PID_DIR=/var/run/php-fastcgi | |
PID_FILE=/var/run/php-fastcgi/php-fastcgi.pid | |
RET_VAL=0 | |
case "$1" in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FASTCGI_USER=www-data | |
FASTCGI_GROUP=www-data | |
ADDRESS=127.0.0.1 | |
PORT=9000 | |
PIDFILE=/var/run/php-fastcgi/php-fastcgi.pid | |
CHILDREN=6 | |
PHP5=/usr/bin/php5-cgi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name localhost www.copsy.org copsy.org; | |
access_log /srv/www/copsy.org/logs/access.log; | |
error_log /srv/www/copsy.org/logs/error.log; | |
root /srv/www/copsy.org/public_html; | |
location / { | |
index index.html index.htm index.php; | |
if (-f $request_filename/index.html){ | |
rewrite (.*) $1/index.html break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/init.d/nginx | |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PATH ------------------------------------------------------------ | |
export PATH="/usr/local/bin:/usr/local/Cellar/ruby/1.9.2-p180/bin/:/usr/local/sbin:~/bin/:$PATH" | |
# Add Bash Completion --------------------------------------------- | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
# Add Bash Completion support for Brew ---------------------------- | |
source `brew --prefix`/Library/Contributions/brew_bash_completion.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2008 Chris Wanstrath | |
# Taken from defunkt's gist repository: http://github.com/defunkt/gist/tree/master | |
require 'open-uri' | |
require 'net/http' | |
require 'net/https' | |
module Gist | |
extend self |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#10 Ruby One Liners to Impress Your Friends | |
#http://programmingzen.com/2011/06/02/10-ruby-one-liners-to-impress-your-friends/ | |
#1. Multiply each item in a list by 2 | |
p (1..10).map {|n| n*2} | |
#2.Sum a list of numbers | |
p (1..1000).inject { |sum, n| sum + n } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
:benchmark: false | |
:bulk_threshold: 1000 | |
:verbose: true | |
:update_sources: true | |
:sources: | |
- http://rubygems.org/ | |
- http://gemcutter.org | |
:backtrace: false | |
#gemrc目录在: mate ~/.gemrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh configuration. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
# 配置theme,这是默认的theme. | |
export ZSH_THEME="robbyrussell" |