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
RSpec::Matchers.define :be_boolean do | |
match do |actual| | |
expect(actual).to satisfy { |x| x == true || x == false } | |
end | |
end | |
it 'is boolean' do | |
expect(true).to be_boolean | |
end |
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 ensure_em | |
unless EventMachine.reactor_running? && EventMachine.reactor_thread.alive? | |
Thread.new { EventMachine.run } | |
sleep 1 | |
end | |
end | |
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
PS1="\\[\\033[32m\\][\\h: \\w]\\[\\033[0m\\]\\n\\u\\\$ " |
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
# 外部からTCPポート10733番(Unity Asset Server接続)へのアクセスを許可 | |
-A Firewall-setting1-INPUT -m state --state NEW -m tcp -p tcp --dport 10733 -j ACCEPT |
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
# プロンプトの設定 | |
PS1='\[\033[0;32m\w\[\033[0m\n[\u]\$ ' |
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
tr -dc A-Za-z0-9_ < /dev/urandom | head -c 12 | xargs |
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
export NSPR_LOG_FILE=/tmp/smtplog.log | |
export NSPR_LOG_MODULES=IMAP:5,SMTP:5,POP3:5 | |
thunderbird | |
gvim /tmp/smtplog.log |
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
## Redmineをアップデートしたら叩くmake | |
## make update | |
## としてくれ | |
# DBのアップデート | |
migration: | |
rake db:migrate RAILS_ENV="production" | |
# キャッシュの削除 | |
clean_cache: |
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
2009 sudo apt-get remove jenkins | |
2010 cd tmp/ | |
2011 wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
2012 sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
2013 sudo apt-get update | |
2014 sudo apt-get install jenkins | |
2015 whoami | |
2016 ls /usr/share/jenkins/jenkins.war | |
2017 ls /usr/share/jenkins/jenkins.war -al | |
2018 ls /usr/share/jenkins/ |
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
*filter | |
# INPUTチェイン宣言(全ての入力パケットを許可する) | |
:INPUT ACCEPT [0:0] | |
# FORWARDチェイン宣言(全ての転送パケットを許可する) | |
:FORWARD ACCEPT [0:0] | |
# OUTPUTチェイン宣言(全ての出力パケットを許可する) | |
:OUTPUT ACCEPT [0:0] | |
#Firewallのセッティング | |
:Firewall-setting1-INPUT - [0:0] |