Skip to content

Instantly share code, notes, and snippets.

View eiel's full-sized avatar

HIMURA Tomohiko eiel

View GitHub Profile
@eiel
eiel / gist:6090160
Created July 26, 2013 16:14
extend self というのが出てきた。何をしてるか想像は付くけど動作確認。
module Hoge
extend self
def hoge
'hoge'
end
end
Hoge.hoge # => hoge
@eiel
eiel / rspec_and_pry_template.rb
Created August 1, 2013 15:59
--templateの実験。 rails new --template rspec_and_pry_template.rb
gem_group :development, :test do
gem 'rspec-rails', '~> 2.0'
gem 'pry-rails'
gem 'pry-byebug'
end
run_bundle
git :init
git add: '.'
@eiel
eiel / review-mode.rcp
Created August 14, 2013 11:05
review-mode(https://github.com/kmuto/review-el) の el-get レシピ
(:name review-mode
:type github
:pkgname "kmuto/review-el"
:after (progn
(require 'review-mode)))
@eiel
eiel / doorkeeper-participants.md
Created October 9, 2013 11:03
Doorkeeper の参加者一覧が欲しい。調べたことを書いておく。 https://github.com/great-h/great-h.github.io/issues/323
@eiel
eiel / gist:7099614
Created October 22, 2013 12:20
何かの例。かきすてで動作確認はしてないけど、こんな感じ。
# attrs
# name
class User < ActiveRecord::Base
has_many :comments
end
# attrs
# user_id
# body
class Comment < ActiveRecord::Base
@eiel
eiel / active_support-notifications.md
Last active December 26, 2015 16:09
ActiveSupport::Notifications の説明の下書き。Ruby勉強会の資料にする。

ActiveSupport::Notifications は通知を実現するクラスです。 通知はオブジェクト同士がメッセージのやりとりをするために使います。 繋りをすごく緩くしたい時に便利な機能。

オブジェクト同士の繋り

メソッド呼び出し

クラス A のインスタンスである オブジェクト a が クラス B のインスタンスであるオブジェクト b のメソッドを呼ぶ。

@eiel
eiel / about_hiroshimarb.md
Last active December 26, 2015 23:59
Hiroshima.rb と 広島Ruby勉強会について。

Hiroshima.rb について

Hiroshima.rb は Ruby の地域コミュニティです。 Ruby というのは プログラミング言語 のひとつです。

Hiroshima.rb の活動

Hiroshima.rb は広島を中心とした半径 x メートル内で活動するグループです。 普段は Facebook や GitHub、Twitter などで活動しています。

@eiel
eiel / Gemfile
Created November 7, 2013 04:29
Logger の @shift_age の動作確認
source "https://rubygems.org"
gem 'delorean'
gem 'active_support'
@eiel
eiel / reading-surume.md
Last active December 28, 2015 23:19
すごい広島 #25 にて スルメ式読書術を読んだので感想を記録しておく。

スルメ式読書術を読む

某コワーキングスペースに置いてあったスルメ式読書術を読んだ。

本書は本を読むことの効能と、本が読めない人のためとして構成されています。最後に、読書することの副作用について書かれています。

最後の章に「知っているからやっている」に変化させることをおすすめしています。 そこはとても共感しております。

この本は本を読む習慣のない人に向けてかかれていて非常に字も大きく、短くまとまっています。

/*
* Adds the serialNumber property to the UIDevice class
*
* The implementation uses undocumented (for iOS) IOKit functions,
* so handle with caution and be prepared for nil.
*/
#import <UIKit/UIDevice.h>
@interface UIDevice (serialNumber)