Skip to content

Instantly share code, notes, and snippets.

View hokkai7go's full-sized avatar

Yutaro Sugai hokkai7go

View GitHub Profile
@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
@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
@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
@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".

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

@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@Gab-km
Gab-km / github-flow.ja.md
Last active October 29, 2024 10:17 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@marocchino
marocchino / rt.md
Created September 17, 2012 17:48
rubykaigi2012 timetable
@hayajo
hayajo / changelog_en.md
Last active November 2, 2024 12:48
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

ぐんまRuby会議01資料まとめ

World in My Eyes

基調講演「Mad Web Programmer」

招待講演1「プログラマー」