--when you are booting with '-v' parameter, it will stuck at here for like 20s-30s or even more
MAC Framework successfully initialized
using 16384 buffer headers and 4096 cluster IO buffer headers
IOAPIC: Version 0x20 Vectors 0:23
Regardless of what we discover, we must understand and truly believe that everyone did the best job he or she could, given what was known at the time, his or her skills and abilities, the resources available, and the situation at hand.
sudo apt-get install python-software-properties sudo add-apt-repository ppa:openswan/ppa sudo apt-get update
# apt-cache policy openswan openswan: Installed: (none) Candidate: 1:2.6.28-1xelerance3 Version table: 1:2.6.28-1xelerance3 0 500 http://ppa.launchpad.net/openswan/ppa/ubuntu/ lucid/main Packages
sudo apt-get install openswan
export SERVER=192.168.1.1 export NET=10.1.1 export USER1=user export PASS1=1234
sudo mv /etc/sysctl.conf /etc/sysctl.conf.bak sudo bash -c "cat > /etc/sysctl.conf <
sudo sysctl -p sudo bash -c 'for each in /proc/sys/net/ipv4/conf/* do echo 0 > $each/accept_redirects echo 0 > $each/send_redirects done '
sudo mv /etc/rc.local /etc/rc.local.bak sudo bash -c "cat > /etc/rc.local <$NET .0/24 -o eth0 -j MASQUERADE exit 0 EOF "
sudo /etc/rc.local
sudo mv /etc/ipsec.secrets /etc/ipsec.secrets.bak sudo bash -c "cat > /etc/ipsec.secrets <$SERVER %any: PSK \"$PASS1\" EOF "
sudo mv /etc/ipsec.conf /etc/ipsec.conf.bak sudo bash -c "cat > /etc/ipsec.conf <$SERVER leftprotoport=17/1701 right=%any rightprotoport=17/%any EOF "
sudo update-rc.d ipsec defaults
sudo apt-get install xl2tpd
sudo mv /etc/xl2tpd/xl2tpd.conf /etc/xl2tpd/xl2tpd.conf.bak sudo bash -c "cat > /etc/xl2tpd/xl2tpd.conf <$NET .2-$NET.255 local ip = $NET.1 refuse chap = yes refuse pap = yes require authentication = yes ppp debug = yes pppoptfile = /etc/ppp/options.xl2tpd length bit = yes EOF "
sudo mv /etc/ppp/options.xl2tpd /etc/ppp/options.xl2tpd.bak sudo bash -c "cat > /etc/ppp/options.xl2tpd <
sudo mv /etc/ppp/chap-secrets /etc/ppp/chap-secrets.bak sudo bash -c "cat > /etc/ppp/chap-secrets <$USER1 l2tpd $PASS1 * EOF "
sudo invoke-rc.d xl2tpd restart sudo invoke-rc.d ipsec restart
# sudo ipsec verify Checking your system to see if IPsec got installed and started correctly: Version check and ipsec on-path [OK] Linux Openswan U2.6.28/K2.6.32.16-linode28 (netkey) Checking for IPsec support in kernel [OK] NETKEY detected, testing for disabled ICMP send_redirects [OK] NETKEY detected, testing for disabled ICMP accept_redirects [OK] Checking that pluto is running [OK] Pluto listening for IKE on udp 500 [OK] Pluto listening for NAT-T on udp 4500 [OK] Two or more interfaces found, checking IP forwarding [OK] Checking NAT and MASQUERADEing Checking for 'ip' command [OK] Checking for 'iptables' command [OK] Opportunistic Encryption Support [DISABLED]
PATH -> paths with your git & mysql & ruby
DYLD_LIBRARY_PATH -> path of your mysql lib
ARCHFLAGS -> -arch x86_64
RUBYOPT -> rubygems
first select your timezone interactively by using 'tzselect', you may
need 'sudo'
after that, we wanna make the change permanently
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
finally we change 'UTC=yes' into 'UTC=no' in the file located at
'/etc/default/rcS'
now you have it done! do a 'date' for sure
class AnyController < ApplicationController def any_action send_data [SOME-BINARY-DATA] end end
when browser make any request to this controller, Rails 3 app will
REMOVE your 'Content-Length' field of the HTTP response header, even
you add content-length in the logic code explicitly
To fix this, we could add a Rack middleware and plug it in to the app,
in your #{Rails.root}/config/application.rb file, find code like below:
module XX class Application < Rails::Application config.middleware.use "HttpHeaderFix" # add this line
then create a file named 'http_header_fix.rb' at #{Rails.root}/middleware
class HttpHeaderFix def initialize(app) @app = app end def call(env) status, headers, response = @app.call(env) if headers["Content-Type"] == "application/octet-stream" if headers["Content-Length"].blank? if response.respond_to? :length length = response.length elsif response.respond_to? :count length = response.count elsif response.respond_to? :size length = response.size elsif response.respond_to? :body length = response.body.length else raise "unknown response: #{response.class}" end headers["Content-Length"] = length.to_s end end [status, headers, response] end endOK, there you go!!
Then you want just add your SSH account like this:
useradd -M -s /sbin/nologin -n usernamesome version of Linux may like this:
useradd -s /sbin/nologin usernameand even the 'nologin' shell is located at '/usr/sbin/nologin' in some
Now, you have a SSH server & account setup
Recommended web browser plugins for SSH proxy:
Firefox users checkout autoproxy:
https://addons.mozilla.org/en-US/firefox/addon/autoproxy/
Chrome users checkout Switchy!:
https://chrome.google.com/webstore/detail/caehdcpeofiiigpdhbabniblemipncjj
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)and then add this to your shell profile:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" CC=/usr/bin/gcc-4.2For ruby 1.9.3, we need libksba installed, using Homebrew, just run
'brew install libksba'installing Homebrew is quite easy too:
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"now try install ruby 1.9.3:
rvm install 1.9.3 --reconfigure --debug -C --enable-pthread --with-gcc=clangNOTE: in case of any compilation issues
Re-open your terminal (reset your session) and you'll be good to go. Up and running with Git in no time!
git svn clone [YOUR-SVN-REPOSITORY-URL]if you've got a git repository in hand, just try
git svn init [YOUR-SVN-REPOSITORY-URL]this may help you set the 'svn-remote' of your git repository
git svn fetch git svn rebase git svn dcommit
ssh-keygen -t rsa -P "" -C <your email address>