JavaScript でクリックのイベント処理とか GET 以外ならトークンを含めるとか全部やらないといけないから面倒くさい
<a href="/some_action" class="some-action">some action</a>
http://uploads.makevoid.com/jquery_dom_highlighter.html |
#!/bin/bash | |
function cmd() { | |
target=$1; shift | |
pane=$1; shift | |
tmux send-keys -t:$target.$pane "$*" C-m | |
} | |
function window() { | |
tmux new-window -a -n "$1" |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
<div class="social-buttons" data-url="http://www.deafway.jp/"></div> | |
<script type="text/javascript"> | |
<!-- | |
$(document).ready(function() { | |
var mixi_favorite_parse = function() { | |
$('div[data-plugins-type="mixi-favorite"]:empty').each(function(i, e) { | |
new window.__MIXI_PLUGINS__.FavoriteFrame(e); | |
}); |
#!/var/lib/jenkins/.rvm/bin/rvm-shell ruby-1.9.3-p194@sqale | |
export RAILS_ENV=test | |
bundle install --without production | |
git checkout -b feature/bundle-update-`date +%Y%m%d` | |
bundle update | |
git add Gemfile Gemfile.lock | |
git commit -m 'bundle update' | |
git push origin feature/bundle-update-`date +%Y%m%d` |
FactoryGirl.define do | |
factory :user do | |
after(:create) do |user| | |
FactoryGirl.create_list(:task, 10, user_id: user.id) | |
end | |
end | |
factory :task do | |
trait :with_user do | |
user |
class Account < ActiveRecord::Base | |
def self.search(name = nil) | |
# search logic | |
end | |
end |
(function(){ | |
var total = {}; | |
var year = '2012'; | |
var all = false; | |
function init(num) { | |
if(typeof num !== 'number') { | |
num = 0; | |
$('<div/>').css({ | |
position: 'fixed', | |
left: 0, |