- 警告:請絕對不要跳著裝!*
> sudo apt-get update > sudo apt-get upgrade > sudo apt-get install git
# 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" |
--- | |
:benchmark: false | |
:bulk_threshold: 1000 | |
:verbose: true | |
:update_sources: true | |
:sources: | |
- http://rubygems.org/ | |
- http://gemcutter.org | |
:backtrace: false | |
#gemrc目录在: mate ~/.gemrc |
#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 } |
# 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 |
# 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 |
# /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 |
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; |
#!/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 |
#!/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 |