vagrant@debian-607-x64-vbox4210:~$ dpkg -s tree && ! dpkg -s tree | grep -E "^Status: .+ not-installed$"
Package `tree' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
vagrant@debian-607-x64-vbox4210:~$ echo $?
1
vagrant@debian-607-x64-vbox4210:~$ sudo apt-get install tree
vagrant@debian-607-x64-vbox4210:~$ dpkg -s tree && ! dpkg -s tree | grep -E "^Status: .+ not-installed$"
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
pushd() | |
{ | |
if [ $# -eq 0 ]; then | |
DIR="${HOME}" | |
else | |
DIR="$1" | |
fi | |
builtin pushd "${DIR}" > /dev/null | |
# echo -n "DIRSTACK: " |
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
source 'https://rubygems.org' | |
gem 'selenium-webdriver' | |
gem 'mail' |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Background Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.12941176470588237</real> | |
<key>Green Component</key> | |
<real>0.12156862745098039</real> |
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
Jan 26 10:06:03 unknown iSSH[338] <Error>: +[NSIndexPath indexPathForItem:inSection:]: unrecognized selector sent to class 0x3f85ccb4 | |
Jan 26 10:06:03 unknown iSSH[338] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSIndexPath indexPathForItem:inSection:]: unrecognized selector sent to class 0x3f85ccb4' | |
*** First throw call stack: | |
(0x37e8f88f 0x331c0259 0x37e9292f 0x37e91915 0x37dec650 0x36cbc1 0x37de93fd 0x30c83e07 0x30c83dc3 0x30c83da1 0x30c83b11 0x370ab933 0x37e63a33 0x37e63699 0x37e6226f 0x37de54a5 0x37de536d 0x362c8439 0x30c96cd5 0x72409 0x6f818) | |
Jan 26 10:06:03 unknown ReportCrash[347] <Notice>: MS:Notice: Installing: (null) [ReportCrash] (690.10) | |
Jan 26 10:06:04 unknown ReportCrash[347] <Notice>: Formulating crash report for process iSSH[338] | |
Jan 26 10:06:04 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.yourcompany.iSSH[0x3a6f]) Job appears to have crashed: Abort trap: 6 |
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 /etc/debian_version | |
6.0.6 | |
$ sudo bash -c "echo 'deb http://packages.treasure-data.com/debian/ lucid contrib' > /etc/apt/sources.list.d/treasure-data.com.list" | |
$ sudo apt-get update | |
$ sudo apt-get install td-agent | |
$ dpkg -l | grep td-agent | |
ii td-agent 1.1.10.3-1 A data collector agent for Treasure Data | |
# do_stop内のstart-stop-daemonの--quietオプションを無効に | |
$ diff -u td-agent.init /etc/init.d/td-agent |
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
data = [] | |
columns = [] | |
ARGF.each_line do |line| | |
data << Hash[line.split("\t").map do |kv| | |
k, v = kv.split(':', 2) | |
columns << k unless columns.include?(k) | |
[k, v] | |
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
# Gemfile | |
gem 'better_errors' | |
gem 'binding_of_caller' | |
# config/application.rb | |
module BetterErrors | |
class Railtie < Rails::Railtie | |
def use_better_errors? | |
return true if ENV['BETTER_ERRORS'] | |
!Rails.env.production? and app.config.consider_all_requests_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
require 'open-uri' | |
region = ARGV.first | |
unless region | |
puts "usage: ruby get-aws-status-rss.rb ap-northeast-1" | |
end | |
source = open("http://status.aws.amazon.com/") {|f| f.read } | |
source.scan(/'(\w+-#{region})'/) do |match| |
NewerOlder