Skip to content

Instantly share code, notes, and snippets.

@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')
@juno
juno / zsh-git-completion-setting.md
Created May 9, 2013 08:09
zshでgitの補完を設定する手順。

gitのソースツリーに含まれるgit-completion.zshをzshで使う手順

注意:gitコマンドがhubコマンドへのエイリアスに設定されている場合は補完が働かない。

補完用ファイルを置くディレクトリを作成する(既に同じ用途のディレクトリがある場合はそれを使う)。

$ mkdir ~/.zsh/completion/
@jhjguxin
jhjguxin / nginx-403-forbidden-error-hosting-in-user-home-directory.md
Created August 12, 2013 05:40
nginx 403 forbidden error when server static file under user home directory
@plentz
plentz / nginx.conf
Last active April 21, 2025 13:23
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@dhoelzgen
dhoelzgen / base_controller.rb
Last active October 7, 2021 16:19
CORS in Rails 4 APIs
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'
@voluntas
voluntas / webrtc.rst
Last active January 13, 2025 22:40
WebRTC の未来
@voluntas
voluntas / webrtc.rst
Last active March 28, 2025 06:01
WebRTC コトハジメ
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 21, 2025 07:39
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example