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
keywords = %W( | |
肉 | |
魚 | |
穀物 | |
野菜 | |
乳製品 | |
酒 | |
) | |
double = keywords.repeated_combination(2) | |
puts double.collect {|arr| arr.join("+") }.join("\n") |
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 'mechanize' | |
require 'zip/zip' | |
agent = Mechanize.new | |
page = agent.get('http://mh.websimu.mydns.jp/4g_csv/') | |
filename = page.links[0].uri.to_s | |
puts "saved #{filename}" | |
File.write(filename, page.links[0].click.body) |
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
wget -r l 1 -Agif -H -Djigokuno.com,img.jigokuno.com -w 1 http://jigokuno.com/ |
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
git diff > patchfile | |
patch --dry-run -p1 < patchfile | |
patch -p1 < patchfile |
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
" vundle settings | |
set nocompatible | |
filetype plugin indent off | |
if has('vim_starting') | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ | |
call neobundle#rc(expand('~/.vim/bundle')) | |
endif | |
NeoBundle 'git://github.com/Shougo/neobundle.vim' |
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
%w{ apache2 supervisor postfix runit tmux sudo pxe_dust aws keystone horizon glance nova varnish tomcat sqlite samba python postgresql openldap ntp nagios nginx mysql cloudkick gecode chef-client build-essential windows logrotate partial_search php erlang apt database chef_handler yum users rabbitmq java logwatch openssh homebrew cron djbdns zsh webpi heartbeat rsyslog keepalived iis git freebsd maven chef-server application_ruby munin bluepill getting-started lvm ark application_nginx application motd-tail haproxy emacs firewall unicorn perl resolver subversion daemontools ossec openvpn passenger_apache2 ohai gunicorn wix application_python application_php couchdb memcached wordpress tftp swift whitelist-node-attrs mercurial xml dmg application_java powershell zenoss xfs vim ufw ucspi-tcp ubuntu transmission trac stompserver ssh_known_hosts snort sbuild reprepro radiant pdns pacman openssl maradns man kickstart jpackage jira jetty iptables imagemagick hadoop gnu_parallel gems dynect drbd chef apparmor ant th |
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
execute "aptitude -y update" do | |
action :run | |
end | |
node['rbenv']['user_installs'] = [ | |
{ | |
'user' => 'vagrant', | |
'rubies' => ['1.9.3-p286'], | |
'global' => '1.9.3-p286', | |
} |
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 ~/.ssh/id_rsa.pub | ssh user@xxx.xxx.xxx.xxx "mkdir -p ~/.ssh; cat - > ~/.ssh/authorized_keys" |
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
#### Contents of the preconfiguration file (for squeeze) | |
### Localization | |
# Preseeding only locale sets language, country and locale. | |
d-i debian-installer/locale string en_US.UTF-8 | |
d-i debian-installer/splash boolean false | |
# The values can also be preseeded individually for greater flexibility. | |
#d-i debian-installer/language string en | |
#d-i debian-installer/country string NL | |
#d-i debian-installer/locale string en_GB.UTF-8 |
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
codeigniterメモ | |
ディレクトリ構成 | |
コードはCodeIgniter/system/application/controllersに書けばいい | |
views modelsもある | |
ログはCodeIgniter/logsを見る | |
config.php database.phpにいろいろ設定する | |
.htaccessにURLのindex.phpを除去する記述を追加する | |
MVC |
NewerOlder