# git clone repo
# cd repo
# git checkout -b new_feature
| for i in {0..255} ; do | |
| printf "¥x1b[38;5;${i}mcolour${i}\n" | |
| done |
| #coding: utf-8 | |
| require 'twitter' | |
| Twitter.configure do |config| | |
| config.consumer_key = 'CONSUMER_KEY' | |
| config.consumer_secret = 'CONSUMER_SECRET' | |
| config.oauth_token = 'OAUTH_TOKEN' | |
| config.oauth_token_secret = 'OAUTH_TOKEN_SECRET' | |
| end |
| validates_presence_of :name | |
| validates :name, :presence => true |
| *filter | |
| # Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 | |
| -A INPUT -i lo -j ACCEPT | |
| -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT | |
| # Accepts all established inbound connections | |
| -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
| # Allows all outbound traffic |
| # Sample verbose configuration file for Unicorn (not Rack) | |
| # | |
| # This configuration file documents many features of Unicorn | |
| # that may not be needed for some applications. See | |
| # http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb | |
| # for a much simpler configuration file. | |
| # | |
| # See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete | |
| # documentation. |
| require 'open-uri' | |
| require 'digest/sha1' | |
| ROOM = '部屋の id' | |
| ID = 'bot の id' | |
| SECRET = 'bot の secret' | |
| VERIFIER = Digest::SHA1.hexdigest(ID + SECRET) | |
| TEXT = "deployしました" | |
| namespace :notification do |
| <% if @entry.prev %> | |
| <a href="<%= url(@entry.prev.link) %>">prev</a> | |
| <% end %> | |
| <% if @entry.next %> | |
| <a href="<%= url(@entry.next.link) %>">next</a> | |
| <% end %> |
| #質問した年月日をつかってTimeクラスのインスタンスを作る。 | |
| myTime = Time.new(year, month, day) | |
| # 今日の日付を作る | |
| now = Time.new | |
| #今日と聞いた日付の年の差を求める。 | |
| age = now.year - myTime.year |
| #/Users/hrysd/Sites/project/.htaccess | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine on | |
| RewriteBase /~hrysd/project | |
| RewriteRule ^$ app/webroot/ [L] | |
| RewriteRule (.*) app/webroot/$1 [L] | |
| </IfModule> |