Skip to content

Instantly share code, notes, and snippets.

View ojiry's full-sized avatar
💪

Ryoji Yoshioka ojiry

💪
View GitHub Profile
#!/bin/sh
tmux rename-window zsh
tmux split-window -h
tmux split-window -v -t zsh.1
tmux send-keys -t zsh.2 'rails s' C-m
tmux new-window -n tig
tmux send-keys -t tig.0 'tig' C-m
#!/bin/sh
tmux rename-window zsh #zshの部分はなんでもいい
# tmux new-window -n zsh #Windowを立ちあげて分割する場合はこっち
tmux split-window -h
tmux split-window -v -t zsh.0
#! /bin/sh
DOT_FILES=( .gemrc .gitconfig .railsrc .tmux.conf .vimrc .zshrc )
DIR=$(cd $(dirname $0);pwd)
for file in ${DOT_FILES[@]}
do
if [ -a $HOME/$file ]; then
echo "Already file exists: $file"
else
source :rubygems
gem 'sinatra'
require 'sinatra'
get '/hi' do
"Hello world!"
end
RSpec::Matchers.define :be_a_multiple_of do |expected|
match do |actual|
actual % expected == 0
end
end
Spec::Matchers.define :be_a_multiple_of do |expected|
match do |actual|
actual % expected == 0
end
end
$ r new ckeditor
$ cd ckeditor
$ cat -n Gemfile | grep -A 2 ckeditor
24 gem 'ckeditor', '3.7.0.rc3'
25 gem "carrierwave"
26 gem "mini_magick"
$ bundle
$ rails g ckeditor:install --orm=active_record --backend=carrierwave
$ rails g scaffold product title body:text
$ rake db:migrate
$ brew search js-test-driver
js-test-driver
$ brew install js-test-driver
Warning: You have Xcode 4.2.1, which is outdated.
Please install Xcode 4.3.
==> Downloading https://js-test-driver.googlecode.com/files/JsTestDriver-1.3.4.b.jar
######################################################################## 100.0%
/usr/local/Cellar/js-test-driver/1.3.4.b: 3 files, 4.1M, built in 6 seconds
$ heroku pg:reset --db SHARED_DATABASE_URL
! The --db option has been deprecated
! Usage: heroku pg:reset [DATABASE]
# 怒られたので
$ heroku pg:reset SHARED_DATABASE_URL
SHARED_DATABASE_URL is deprecated, please use SHARED_DATABASE
----> Resetting SHARED_DATABASE (DATABASE_URL)
! WARNING: Potentially Destructive Action
! This command will affect the app: [アプリ名]