Skip to content

Instantly share code, notes, and snippets.

View hamajyotan's full-sized avatar

SAKAGUCHI Takashi hamajyotan

View GitHub Profile
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
# In your test_helper.rb
class ActiveRecord::Base
mattr_accessor :shared_connection
@@shared_connection = nil
def self.connection
@@shared_connection || retrieve_connection
end
end
I am the owner of lvh.me. And I'm glad to hear it's helpful. In truth, it's just a fancy DNS trick. lhv.me and all of it's sub-domains just point back to your computer (127.0.0.1). That means running ssl is as simple (or difficult) as running ssl on your computer.
I'm not sure how comfortable you are with the command line, but here's my how I setup my development environment. (rvm, passenger, nginx w/ SSL, etc).
# Install rvm (no sudo!)
# ------------------------------------------------------
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
source ~/.rvm/scripts/rvm
rvm install ree-1.8.7-2010.02
@qiusj
qiusj / l2tp.sh
Created December 22, 2011 12:35
#!/bin/bash
if [ $(id -u) != "0" ]; then
printf "Error: You must be root to run this tool!\n"
exit 1
fi
clear
printf "
####################################################
# #
@yhara
yhara / gist:1889303
Created February 23, 2012 02:24
Ruby Twitter Gem 1.1.1 簡易リファレンス
Ruby Twitter Gemの簡易リファレンス(というかメモ)です。内容はバージョン1.1.1に準拠しています。
{{toc_here}}
! インストール
$ gem install twitter -v=1.1.1
(環境によっては sudo gem ~)
! 概要
* 公式サイト:http://twitter.rubyforge.org/
@melborne
melborne / Plugins.textile
Created May 9, 2012 11:54
Translation of Jekyll Plugins

https://github.com/mojombo/jekyll/wiki/Plugins

Jekyllプラグインシステムのフックは、あなたのサイト向けに特化したコンテンツの生成を可能にします。Jekyllのソースを修正することなく、あなたのサイト用のコードを実行できます。

The Jekyll plugin system hooks allow you to create custom generated content specific to your site. You can run custom code for your site without having to modify the Jekyll source itself.

プラグインのインストール

h2. Installing a plugin

@jugyo
jugyo / gist:3509080
Created August 29, 2012 09:32
とあるプロジェクトで使ったライブラリたち

とある Rails プロジェクトで使ったライブラリたち

  • carrierwave - ファイルアップロードを処理するやつ
  • carrierwave_backgrounder - アップロードされたフィアルの処理(画像のリサイズ等)をバックグラウンドで処理する
  • delayed_job_active_record - バックグラウンド処理
  • fog - AWS との連携に使う。 carrierwave がこれを使って S3 にファイルを保存してくれたりする
  • haml-rails - haml 使いたいねん
  • twitter-bootstrap-rails - あれ
  • will_paginate - ページネーション
  • bootstrap-will_paginate - twitter-bootstrap 的にいい感じのタグを出力してくれる
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@yuua
yuua / oauth2_fugu_book.md
Created October 25, 2012 09:44
OAuth2読書会

1章

重要な用語

1.認証(Authentication) ユーザ自身が何者であると主張しているかを検証するプロセス ユーザ名が表すのはユーザが主張するアイデンティティであり、アプリケーション側は、ユーザの入力したパスワードが正しければ、本人であるとみなす

2.連合型認証(Federated Authentication) ユーザアイデンティティの検証プロセスを外部サービスに依存しているアプリケーションのことをいう。