Skip to content

Instantly share code, notes, and snippets.

View toshi-kawanishi's full-sized avatar

Toshiyuki Kawanishi toshi-kawanishi

View GitHub Profile
@toshi-kawanishi
toshi-kawanishi / git-now
Created November 18, 2010 18:44
making convenient git commit
#!/bin/sh
PREFIX="from now"
MESSAGE="[${PREFIX}] `date`"
if [ $# -eq 0 ]
then
git add -u
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
elif [ $1 != "--rebase" ]
@toshi-kawanishi
toshi-kawanishi / seeds.rb
Last active October 10, 2015 07:58 — forked from aq2bq/seeds.rb
[JPローカライズ] Spree 2.3.2 with Rails 4.1 用シードファイル
# encoding: utf-8
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
# Spree::Core::Engine.load_seed if defined?(Spree::Core)