Skip to content

Instantly share code, notes, and snippets.

View yhirano55's full-sized avatar
🐕
Enjoy

yhirano55 yhirano55

🐕
Enjoy
View GitHub Profile
@yhirano55
yhirano55 / .env
Last active July 2, 2016 05:42
activeadminにおけるGoogle認証(omniauth-google-oauth2)導入手順 ref: http://qiita.com/yhirano55/items/35723893461717302940
GOOGLE_CLIENT_ID=**********YOUR_CLIENT_ID**********
GOOGLE_CLIENT_SECRET=**********GOOGLE_CLIENT_SECRET**********

Human.create.run

event current was
before_all_events sleeping sleeping
before_event sleeping sleeping
guards_event sleeping sleeping
guards_transition sleeping sleeping
before_exit_old_state sleeping sleeping
exit_old_state sleeping sleeping
@yhirano55
yhirano55 / anaconda.md
Created March 5, 2017 14:16
GolangでTwitterの検索結果を出力する

GolangでTwitterの検索結果を出力する

library

$ go get github.com/ChimeraCoder/anaconda

golangでJSONを扱う

encofing/jsonパッケージを利用する

JSONのUnmarshalize

package main

import (

目的

  • Dockerを管理するフレームワーク。Google製。
  • 船の舵をとる人、という意味

構成例

仕組みを知るうえで、欠かせない概念

Kubernetes Study

コマンド

# プロジェクト情報の確認
$ gcloud config list

# 予めセットすると設定しやすい
$ gcloud config set project PROJECT_ID
@yhirano55
yhirano55 / for_speakers.md
Last active February 23, 2022 13:44
Rails Developers Meetup 2017: ご登壇に関する注意事項

Rails Developers Meetup 2017 ご登壇者各位

12月9日(土)のご登壇に関して、期日が迫ってきましたので、 改めていくつか注意事項等をアナウンスさせていただきます。

CHANGELOG

  • 12/3 19:25 TECH PLAY SHIBUYAでの推奨スクリーンサイズの件を追記

登壇方法について

@yhirano55
yhirano55 / file0.rb
Last active December 7, 2017 08:06
関心事の分離とアンチパターン ref: https://qiita.com/yhirano55/items/92ba558bcb19f3a1f233
class Todo < ApplicationRecord
# Other todo implementation
# ...
## Event tracking
has_many :events
before_create :track_creation
after_destroy :track_deletion
@yhirano55
yhirano55 / main.rb
Last active February 17, 2018 03:20
Calculate robots sample
def calculate(n)
[1, 2, 3].repeated_combination(n).to_a.each_with_object({}) { |a, cache|
Array.new(n) do |i|
combination = a[0..i]
if combination.sum == n && !cache.key?(combination)
cache[combination] = true
end
end
}.keys
end
@yhirano55
yhirano55 / for_speaker.md
Last active February 23, 2022 13:44
Railsdm 2018: ご登壇者向け資料

Railsdm 2019: ご登壇者向け資料

要点

発表資料について

  • 両日の会場ともに、アスペクト比は、16:9 となります。
  • スクリーンまでの距離が遠いため、 文字サイズは多少大きめ がよさそうです。

登壇方法について