Skip to content

Instantly share code, notes, and snippets.

View hokkai7go's full-sized avatar

Yutaro Sugai hokkai7go

View GitHub Profile
@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] というものがよく使われてた

@jrochkind
jrochkind / gist:2161449
Created March 22, 2012 18:40
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@keimei
keimei / stripes
Created December 31, 2011 18:31
alternate background color
#!/usr/bin/gawk -f
#alternate background color like stripes.el(http://www.emacswiki.org/cgi-bin/wiki/stripes.el)
#usage: something command | stripes
BEGIN{
BG=44
#40 Black
#41 Red
#42 Green
#43 Yellow
#44 Blue
@oshow
oshow / app.rb
Created November 16, 2011 09:29
for Rubyist Magazine 0036
# encoding: utf-8
require 'rubygems'
require 'sinatra/base'
require 'sinatra/reloader'
require 'rack/rewrite'
require 'haml'
class App < Sinatra::Base
enable :inline_templates
@joker1007
joker1007 / rails3-rspec-template.rb
Created September 2, 2010 07:55
rails3-template use Rspec
# rails3-rspec-template
#
# using:
# haml
# rspec
# cucumber
# guard
# spork