Skip to content

Instantly share code, notes, and snippets.

View mh61503891's full-sized avatar
🍣

Masayuki Higashino mh61503891

🍣
View GitHub Profile
@j5ik2o
j5ik2o / gist:1520836
Last active January 3, 2017 17:09
Scalaで使えそうなWeb系フレームワーク&ライブラリ
@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@vividtone
vividtone / issues_with_attachments.rb
Created March 1, 2012 06:56
Redmineの添付ファイル付きチケットの一覧をCSV形式で表示
# encoding: utf-8
#
# Redmineの添付ファイル付きのチケットの一覧をCSV形式で表示。
#
# [実行方法]
# ruby script/runner -e production issues_with_attachments.rb
issues_attachments = Attachment.all.select {|item| item.container_type == 'Issue'}
issues_attachments.each do |item|
issue = Issue.find(item.container_id)
@thbar
thbar / README.MD
Created April 18, 2012 09:43
Ruby JSON pipe pretty-printer

A quick ruby command line to pretty-print piped json.

Usage

Put this somewhere in your path, with chmod +x, then:

curl http://myapp.com/stuff.json | json

@nicerobot
nicerobot / README.md
Last active May 26, 2024 15:39
Mac OS X uninstall script for packaged install of node.js from https://stackoverflow.com/a/9287292/23056

To run this, you can try:

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
@rummelonp
rummelonp / faraday.md
Last active May 20, 2022 12:23
Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

Ruby の HTTP クライアントライブラリ Faraday が便利そう

API ラッパの開発には [RestClient gem][rest_client_gem] だとか
OAuth の必要なものは [Net/HTTP][net_http] + [OAuth gem][oauth_gem] を使ってた

[Twitter gem][twitter_gem] や [Instagram gem][instagram_gem] など API ライブラリのソースを読んでみると
[Faraday gem][faraday_gem] というものがよく使われてた

@ponkore
ponkore / memo.sh
Created August 3, 2012 05:19
github上でgithubにフォークしたリモートリポジトリを本家リモートリポジトリに追随する
# http://d.hatena.ne.jp/haru-s/20110405/1302006637 に答えがそのままあるが、一応メモ
# github fork 追従 で見つけた
$ git remote
origin
# 本家のリモートリポジトリの短縮名を登録する.
$ git remote add github git://github.com/liquidz/misaki.git
# 本家の更新をローカルで反映させる.
@tkawa
tkawa / i18n_exception_handler.rb
Created February 3, 2013 12:36
Railsでlocaleの翻訳が見つからなかったとき、“translation missing”はログに出して、viewにはhumanizeした文字列を出す
# config/initializers/i18n_exception_handler.rb
I18n.exception_handler = ->(exception, locale, key, options) do
if exception.is_a?(I18n::MissingTranslation)
Rails.logger.warn exception.message if Rails.env.development?
key.to_s.split('.').last.humanize
else
raise exception
end
end
@jookyboi
jookyboi / imap_idle.rb
Created March 18, 2013 19:32 — forked from jem/gist:2783772
Implement IMAP idle in Ruby.
SERVER = 'imap.gmail.com'
USERNAME = 'XXX'
PW = 'XXX'
require 'net/imap'
require 'net/smtp'
require 'tmail'
require 'maruku'
def to_markdown(text)
Maruku.new(text).to_html
@deris
deris / vim_keymapping.md
Created May 2, 2013 10:01
vimで使うキーの機能使用頻度と打ちやすさの整理

vimで使うキーの機能使用頻度と打ちやすさの整理

vimで使うキーの機能使用頻度と打ちやすさを整理してみました。 今回整理したのはnormalモードについてだけです。 機能の使用頻度と打ちやすさは、完全に個人の見解です。 キーボードによっても打ちやすさは変わると思います。

すべてのキーを網羅しているわけではありません。