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 1 > /proc/sys/kernel/sysrq | |
echo b > /proc/sysrq-trigger |
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
#!/bin/sh | |
exec 2>&1 | |
exec \ | |
sh -c ' | |
export HOME=/home/app/ | |
export LANG=ja_JP.utf8 | |
# @reference https://rvm.io/integration/cron/ | |
source ~/.rvm/environments/ruby-2.0.0-p0@MyApp | |
cd ~/MyApp | |
exec \ |
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
# @reference http://d.hatena.ne.jp/hiroppon/20081122/1228069519 | |
# openssl | |
# sharedオプションでlibssl.soを作る | |
./Configure shared --prefix=/usr/local/openssl-x.x.x | |
make | |
make install | |
# chdir 略 |
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
gemは3系バージョンなのでバージョンを指定する。 | |
$ gem gemset create test | |
$ gem gemset use test | |
$ gem install rails --version 4.0.0.rc1 --no-ri --no-rdoc |
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
#tcp | |
config.vm.network :forwarded_port, guest: 80, host:8080 | |
#udp | |
config.vm.network :forwarded_port, guest: 161, host:10161, protocol:'udp' |
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
# 過去1週間分のコマンド出力を保存 | |
0 0 * * * cat /dev/null > /var/log/netstat.out.`date +\%w` | |
* * * * * ( LANG=C date; netstat -antop; echo ) >> /var/log/netstat.out.`date +\%w` | |
0 0 * * * cat /dev/null > /var/log/ps.out.`date +\%w` | |
* * * * * ( LANG=C date; ps axufw; echo ) >> /var/log/ps.out.`date +\%w` |
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/env ruby | |
require 'growthforecast-client' | |
require 'parallel' | |
$requests = 20000 # number of requests to perform | |
$concurrency = 128 # number of multiple requests to make | |
puts "requests = #{$requests}" | |
puts "concurrency = #{$concurrency}" |
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
10:56:29 3.1 | Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle growthforecast;hostname=localhost at /home/growthforecast/.perlbrew/libs/perl-5.19.0@GrowthForecast/lib/perl5/Scope/Container.pm line 38. | |
10:56:29 3.1 | Error:DBD::mysql::st execute failed: Deadlock found when trying to get lock; try restarting transaction [for Statement "INSERT /* /home/growthforecast/GrowthForecast/lib/GrowthForecast/Data.pm line 271 */ INTO graphs (service_name, section_name, graph_name, number, mode, color, llimit, sllimit, created_at, updated_at) | |
10:56:29 3.1 | VALUES (?,?,?,?,?,?,?,?,?,?)" with ParamValues: 0="0", 1="0", 2="0", 3="9850", 4='gauge', 5='#66cc99', 6=-1000000000, 7=-100000, 8=1370397389, 9=1370397389] at /home/growthforecast/.perlbrew/libs/perl-5.19.0@GrowthForecast/lib/perl5/DBIx/Sunny.pm line 150. | |
10:56:29 3.1 | 0/0/0 => 9850,gauge, at /home/growthforecast/GrowthForecast/lib/GrowthForecast/Web.pm line 815. | |
10:56:29 3 |
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
https://github.com/binarylogic/settingslogic |
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
* * * * * /bin/bash -lc "cd $HOME/app && RUBY_ENV=production ./scripts/batch.rb > /dev/null" |