Skip to content

Instantly share code, notes, and snippets.

View nashirox's full-sized avatar
🏠
Working from home

Daisuke Nashiro nashirox

🏠
Working from home
View GitHub Profile
@yoshimana
yoshimana / BrewBundleの使い方.md
Created October 29, 2019 07:23
Brew Bundleの使い方

Brew Bundle

インストール

$ brew tap Homebrew/bundle
@mono0926
mono0926 / commit_message_example.md
Last active May 23, 2024 00:48
[転載] gitにおけるコミットログ/メッセージ例文集100
@hashrock
hashrock / diag.md
Last active February 26, 2024 05:51
作図系ツール・ライブラリまとめ

シーケンス図とかフローチャートをしごとで描画することになった場合、 テキストから生成できたら楽なので、それ系のツールまとめ

GraphViz

http://www.graphviz.org/

  • C製
  • Doxygen, Moinmoinなどと連携可能
  • ブロック図、クラス図、ネットワーク図など

マージ済みのリモートブランチを全て削除

git branch -r --merged master | grep -v -e master -e develop | sed -e 's% *origin/%%' | xargs -I% git push --delete origin %
  1. remote の master に merge済み の branch をすべて表示して
  2. master と develop は消えてほしくないので除外して
  3. origin/ を削除して
  4. xargs (-I% % で ブランチ名を渡しつつ、全て削除する)
@satour
satour / devise.ja.yml
Created October 4, 2014 11:42
Japanese locale file for Devise (3.4.0)
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
ja:
devise:
confirmations:
confirmed: 'アカウントを登録しました。'
send_instructions: 'アカウントの有効化について数分以内にメールでご連絡します。'
send_paranoid_instructions: "あなたのメールアドレスが登録済みの場合、本人確認用のメールが数分以内に送信されます。"
failure:
already_authenticated: 'すでにログインしています。'
@JunichiIto
JunichiIto / alias_matchers.md
Last active May 14, 2024 08:48
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
class User < ActiveRecord::Base
alias :devise_valid_password? :valid_password?
def valid_password?(password)
begin
devise_valid_password?(password)
rescue BCrypt::Errors::InvalidHash
return false unless Digest::SHA1.hexdigest(password) == encrypted_password
logger.info "User #{email} is using the old password hashing method, updating attribute."
self.password = password