Skip to content

Instantly share code, notes, and snippets.

View hrysd's full-sized avatar
🤔
hoi

Hiroshi Yoshida hrysd

🤔
hoi
View GitHub Profile
@hrysd
hrysd / Gemfile
Created January 8, 2013 01:29
define_method かっこいい。
source :rubygems
gem 'garb'
gem 'active_support'
@hrysd
hrysd / Gemfile
Last active December 10, 2015 03:08
source :rubygems
gem 'clockwork'
gem 'heroku'
gem 'active_support'
gem 'lingman', git: 'git://github.com/hrysd/lingman.git'
.field_with_errors
@include formFieldState(#b94a48, #ee5f5b, lighten(#ee5f5b, 30%))
@extend .error
resources :users do
  get 'hoge' # 1
  get ':id/hoge' # 2
end
resources :users do
 collection do
git push origin :BRACH_NAME
@hrysd
hrysd / Rakefile
Created September 18, 2012 04:46
CC = "gcc"
task :default => "hello"
file "hello" => "hello.o" do
sh "#{CC} -o hello hello.o"
end
file "hello.o" => "hello.c" do
sh "#{CC} -c hello.c"
#/Users/hrysd/Sites/project/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /~hrysd/project
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
@hrysd
hrysd / pull_request.md
Created September 1, 2012 17:46
pull request

pull request しましょう。

基本的な流れ

Github 上で fork する

# git clone repo
# cd repo

作業用のbranch を作り、切り替える(基本的にmasterはいじらない)

# git checkout -b new_feature

なにかをする。

#質問した年月日をつかってTimeクラスのインスタンスを作る。
myTime = Time.new(year, month, day)
# 今日の日付を作る
now = Time.new
#今日と聞いた日付の年の差を求める。
age = now.year - myTime.year
@hrysd
hrysd / entry.erb
Created August 23, 2012 01:56
lokka の entry.erb
<% if @entry.prev %>
<a href="<%= url(@entry.prev.link) %>">prev</a>
<% end %>
<% if @entry.next %>
<a href="<%= url(@entry.next.link) %>">next</a>
<% end %>