Skip to content

Instantly share code, notes, and snippets.

Jim Chang zxcvbnm4709

Block or report user

Report or block zxcvbnm4709

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View site.css.sass.erb
@import "compass"
@import "preboot"
@import "compass-bootstrap/compass_bootstrap"
body
background: url(<%= asset_path 'background3.jpg' %>)
//background-color: #dedede
#main
//background-color: white
//+box-shadow(rgba(#dedede,0.5) 1px 0px 2px)
#header
@zxcvbnm4709
zxcvbnm4709 / gist:1398872
Created Nov 28, 2011
rake assets:precompile
View gist:1398872
jimchang ~/projects/tw-voting[master ☠]$ rake assets:precompile
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
mkdir -p /Users/jimchang/projects/tw-voting/public/assets
@zxcvbnm4709
zxcvbnm4709 / whatever.rb
Created Nov 13, 2011
一般來說,class static variable的accessor怎麼寫
View whatever.rb
# 如果你指的class static variable是@@a這種
# 我會這麼寫(至於多數人怎麼寫我就不清楚了...sorry = =")
class A
@@class_var = 'I am A'
def self.class_var
@@class_var
end
end
@zxcvbnm4709
zxcvbnm4709 / gist:1109088
Created Jul 27, 2011
"$(brew --prefix mysql)"/bin/mysql_secure_installation
View gist:1109088
jim@mbp: ~$ "$(brew --prefix mysql)"/bin/mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
@zxcvbnm4709
zxcvbnm4709 / gist:1109012
Created Jul 27, 2011
brew install mysql
View gist:1109012
Warning: m4 macros were installed to "share/aclocal".
Homebrew does not append "/usr/local/share/aclocal"
to "/usr/share/aclocal/dirlist". If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.
View 20110722081111_create_members.rb
class CreateMembers < ActiveRecord::Migration
def self.up
create_table :members do |t|
t.integer :family_id
t.string :name
t.integer :tree_position_id
t.string :gender
t.datetime :birthday
t.string :bloodtype
You can’t perform that action at this time.