$ sudo /usr/bin/php /usr/lib/php/install-pear-nozlib.phar
$ cat >> ~/.bashrc <<'EOF'
alias pear="php /usr/lib/php/pear/pearcmd.php"
alias pecl="php /usr/lib/php/pear/peclcmd.php"
EOF
$ . ~/.bashrc
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
App::import('Core', 'Controller'); | |
App::import('Component', 'Session'); | |
$Controller = new Controller(); | |
$Session = new SessionComponent(); | |
$Session->startup($Controller); | |
$Session->read('Auth.User'); |
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
require 'formula' | |
class Varnish3 <Formula | |
url 'http://repo.varnish-cache.org/source/varnish-3.0.2.tar.gz' | |
homepage 'http://www.varnish-cache.org/' | |
md5 'c8eae0aabbe66b6daabdf3a1f58cd47a' | |
depends_on 'pkg-config' => :build | |
depends_on 'pcre' => :build |
Install these packages:
$ apt-get install build-essential zlib1g zlib1g-dev \
libreadline6 libreadline6-dev libssl-dev libyaml-dev \
libffi-dev libgdbm-dev libx11-dev aptitude libtidy-dev \
libxml2-dev libevent-dev libev-dev autoconf
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
# Install Ruby 2.0 | |
apt-get -y update | |
apt-get -y -m install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev libxslt1-dev libxml2-dev libcurl4-openssl-dev libffi-dev libgdbm-dev libncurses5-dev | |
cd /tmp | |
wget http://ftp.ruby-lang.org/pub/ruby/ruby-2.1.0.tar.gz | |
tar xzvf ruby-2.1.0.tar.gz | |
cd ruby-2.1.0/ | |
./configure --prefix=/usr/local | |
make |
From the Percona site:
Percona XtraDB Cluster is a high availability and high scalability solution for MySQL users. Percona XtraDB Cluster integrates Percona Server with the Galera library of high availability solutions in a single product package. Percona XtraDB Cluster enables users to save money through:
- Less downtime and higher availability
- Reduced investment in high availability architectures
- Lower DBA training and education costs
- No investment in third-party, high availability solutions
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
# render in before_filter | |
before_filter | |
render 'template' and return | |
end | |
# Render conditional | |
def index | |
respond_to do |format| |
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
# Prefix to C-a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# Vim bindings | |
set -g status-keys vi | |
# Use vim keybindings in copy mode | |
setw -g mode-keys vi |
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
releases=`ps aux | grep resque- | sudo pwdx \`awk '{print $2}'\` | sed 's/\(.*\)\/path\/to\/releases\/\(.*\)/\2/' | sed 's/.*No such process//'` | |
current_release=`readlink /path/to/current | sed 's/\/path\/to\/releases\/\(.*\)/\1/'` | |
for r in $releases; do | |
if [ $r = $current_release ]; then | |
echo 'yes' | |
else | |
echo 'no' | |
fi |
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
def assets_same_since?(old_assets_version = nil) | |
return false if old_assets_version.nil? || old_assets_version.empty? | |
return false if ENV['FORCE_ASSETS_COMPILATION'] | |
changed = %x(git diff #{old_assets_version}.. \ | |
vendor/assets/ \ | |
app/assets/ \ | |
config/javascript_translations.yml \ | |
config/javascript.yml | wc -l).chomp |
OlderNewer