This file contains 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
tar xvJf ***.tar.xz |
This file contains 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
ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' < file.yml > file.json |
This file contains 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
curl -O http://7xj5oe.com1.z0.glb.clouddn.com/files/chef-12.3.0-1.dmg | |
open chef-12.3.0-1.dmg |
This file contains 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
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys" |
This file contains 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
# curl -sL https://git.io/v1sVj | sudo bash | |
#!/usr/bin/env bash | |
RUBY_VERSION='2.2.1' | |
CHEF_VERSION='12.3.0' | |
echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
sudo locale-gen --lang zh_TW.UTF-8 |
This file contains 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
sudo apt-get -y update | |
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev vim | |
# Download and compile Ruby 2.0.0-p0 | |
cd /tmp | |
#wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz | |
wget http://ruby.taobao.org/mirrors/ruby/2.0/ruby-2.0.0-p353.tar.gz | |
tar -xvzf ruby-2.0.0-*.tar.gz | |
cd ruby-2.0.0-* | |
./configure --prefix=/usr/local |
This file contains 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
# bash < <( curl -L https://gist.githubusercontent.com/SammyLin/974def3b8f4cd84ce284/raw/31cbdaacb5d85f5ad483e58673f70f3a60699210/gistfile1.sh ) | |
#!/bin/bash | |
set -e | |
echo 'hi' |
This file contains 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 | |
find . -name _vti_cnf -exec rm -rf {} \; | |
find . -name _borders -exec rm -rf {} \; | |
find . -name _private -exec rm -rf {} \; | |
find . -name _vti_pvt -exec rm -rf {} \; | |
find . -name _vti_txt -exec rm -rf {} \; | |
find . -name _vti_script -exec rm -rf {} \; | |
find . -name .DS_Store -exec rm -rf {} \; | |
find . -name WS_FTP.LOG -exec rm -rf {} \; |
This file contains 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
check process solr-<%= fetch(:application) %> with pidfile <%= "#{shared_path}/pids/sunspot-solr.pid" %> | |
start program = "/bin/su - deploy -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sunspot-solr start --port=8983 --data-directory=<%= shared_path %>/solr/data --pid-dir=<%= shared_path %>/pids'" | |
stop program = "/bin/su - deploy -c 'cd <%= current_path %> && <%= SSHKit.config.command_map[:bundle] %> exec sunspot-solr stop --pid-dir=<%= shared_path %>/pids'" | |
if failed host 127.0.0.1 port 8983 protocol http and request "/solr" then restart | |
if 3 restarts within 5 cycles then timeout |
This file contains 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
<ul id="menu"> | |
<li><a href="#">即時新聞</a> | |
<ul class="sub_menu"> | |
<li><a href="#">昨天新聞</a></li> | |
<li><a href="#">今天新聞</a></li> | |
<li><a href="#">前天新聞影音多媒體</a></li> | |
</ul> | |
</li> | |
<li><a href="#">影音多媒體</a> | |
<ul class="sub_menu"> |