Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env sh
brew update
brew install rbenv
brew install ruby-build
brew install openssl
CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` rbenv install 2.0.0-preview1

ruby-build failed me, so I took matters into my own hands. Here's what worked

download and extract ruby 2.0.0p-195 to ~/.rbenv/src/ruby-2.0.0p195

mkdir $HOME/.rbenv/src
cd $HOME/.rbenv/src
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p195.tar.gz
tar xzf ruby-2.0.0-p195.tar.gz
iptables -A INPUT -p udp --dport 500 -j ACCEPT
iptables -A INPUT -p udp --dport 4500 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o eth0 -j MASQUERADE
iptables -A FORWARD -s 192.168.10.0/24 -j ACCEPT
%any %any : PSK "hurdle"
# ipsec.conf - strongSwan IPsec configuration file
# basic configuration
config setup
# strictcrlpolicy=yes
# 允许ID多次登录
uniqueids = never
# strongswan.conf - strongSwan configuration file
charon {
# 支持 aggrisive 模式
i_dont_care_about_security_and_use_aggressive_mode_psk = yes
install_virtual_ip = yes
# 相同ID同时登录检查,no 为不检查
duplicheck.enable = yes
#interfaces_use = em0

链接你的 Cisco IPsec VPN 启动后会自动生成配置文件在:(xxx.xxx.xxx.xxx 为你的ip地址)

/var/run/racoon/xxx.xxx.xxx.xxx.conf

拷贝配置文件到/etc/racoon

sudo cp /var/run/racoon/xxx.xxx.xxx.xxx.conf /etc/racoon

修改 IPSec 配置文件

server {
### This setting tells Nginx to use this configuration if it gets a request for
### yourblog.com
server_name yourblog.com;
### This is the location on the web server where your Octopress files are
### published. Setting this here means you don't have to set it for any of the
### individual locations you define below.
root /var/www/yourblog.com;
#!/bin/sh
GIT_WORK_TREE=/path/to/staging/directory git checkout -f