This file contains hidden or 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
| heroku config --long | ruby -pe "\$_ = \$_.gsub(/(\w+)\s+=> (.+)/, 'export \1=\2')" > /tmp/$$ && source /tmp/$$; rm /tmp/$$ |
This file contains hidden or 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 http://redis.googlecode.com/files/redis-2.0.4.tar.gz | tar zx | |
| cd redis-2.0.4 | |
| make | |
| sudo cp redis-server /usr/local/sbin | |
| sudo cp redis-cli /usr/local/bin | |
| sudo mkdir /var/lib/redis /etc/redis | |
| sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel debug$/loglevel notice/" -e "s/^logfile stdout$/logfile \/var\/log\/redis.log/" redis.conf > /etc/redis/redis.conf | |
| curl -G https://gist.github.com/gists/257849/download | tar -zxO > redis-server | |
| chmod u+x redis-server | |
| mv redis-server /etc/init.d |
This file contains hidden or 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 http://redis.googlecode.com/files/redis-2.4.2.tar.gz | tar zx | |
| cd redis-2.4.2 | |
| make | |
| sudo cp redis-server /usr/local/sbin | |
| sudo cp redis-cli /usr/local/bin | |
| sudo mkdir /var/lib/redis /etc/redis | |
| sudo sed -e "s/^daemonize no$/daemonize yes/" -e "s/^dir \.\//dir \/var\/lib\/redis\//" -e "s/^loglevel debug$/loglevel notice/" -e "s/^logfile stdout$/logfile \/var\/log\/redis.log/" redis.conf > /etc/redis/redis.conf | |
| curl -G https://gist.github.com/gists/257849/download | tar -zxO > redis-server | |
| chmod u+x redis-server | |
| mv redis-server /etc/init.d |
This file contains hidden or 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
| class nagios { | |
| include nagios::install, nagios::config, nagios::service | |
| } | |
| class cleanup { | |
| tidy { "/etc/nagios3/hosts.d/" | |
| } | |
| } | |
| import "definitions/*.pp" |
This file contains hidden or 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
| class munin {} | |
| class cleanup { | |
| exec { "rm -rf /etc/munin/munin-conf.d/*" } | |
| } | |
| import "definitions/*.pp" |
This file contains hidden or 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 items | |
| @lists.collect(&:items).flatten | |
| end |
This file contains hidden or 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 run_pg_fouine(): | |
| info = host_info[env.host_string] | |
| db_name = info.tags.get('Name') | |
| sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf') | |
| sudo('/etc/init.d/postgresql reload') | |
| time.sleep(30) | |
| sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf') | |
| sudo('/etc/init.d/postgresql reload') | |
| run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt') | |
| run('gzip -f /tmp/pgfouine.txt') |
This file contains hidden or 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
| #!/usr/bin/ruby | |
| require 'minitest/spec' | |
| describe_recipe 'audible_magic::default' do | |
| include MiniTest::Chef::Assertions | |
| include MiniTest::Chef::Context | |
| include MiniTest::Chef::Resources |
This file contains hidden or 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 'rubygems' | |
| require 'sinatra' | |
| require 'json' | |
| class GitHubUpdater | |
| def self.update?(json) | |
| (JSON.parse(json)["ref"] == "refs/heads/master") | |
| end |
This file contains hidden or 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
| echo "Checking for Ruby syntax errors..." | |
| find . \( -name *.rb -or -name Vagrantfile \) -exec echo "Checking syntax of {}" \; -exec ruby -c {} \; |
OlderNewer