Ruby on Rails
Thomas Mak thomas@cpttm.org.mo
#import "UIDevice+hardware.h" | |
#include <sys/types.h> | |
#include <sys/sysctl.h> | |
@implementation UIDevice (Hardware) | |
/* | |
Platforms | |
iPhone1,1 -> iPhone 1G | |
iPhone1,2 -> iPhone 3G |
html, body{ | |
background: transparent; | |
} | |
ul,li{ | |
margin:0; | |
list-style:none; | |
} | |
li { |
# modification code for the "git to log commits to Day One" | |
# at http://brettterpstra.com/logging-with-day-one-geek-style/ | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/" | |
} | |
# And use the branch name in the log message | |
GIT_DIR=$(parse_git_branch) |
// About Using Reveal Modal in Zurb Foundation CSS Framework | |
// Show a modal (documented in Foundation doc) | |
$('#modal').reveal(options) | |
// The followings are not documented in Foundation doc. | |
// Close a modal | |
$('#modal').trigger('reveal:close'); | |
// Close all modal |
{ | |
"font_options": | |
[ | |
"no_antialias" | |
] | |
} |
desc 'Help' | |
task :default do | |
puts 'rake preview - Preview the site' | |
puts 'rake build - Build the stie into static files' | |
puts 'rake push - Push to heroku' | |
end | |
desc 'Preview the site' | |
task :preview do | |
exec 'wintersmith preview -C wintersmith -p 1234' |
#content { | |
border: 2px solid green; | |
position: relative; | |
margin: 10px; | |
margin-top: 100px; | |
height: 24px; | |
line-height: 24px; | |
} | |
#content:after { |
.next, .current { | |
transition: all 0.5s ease-out; | |
} |
#routes.rb | |
get "blog/category/:category/" => "posts#by_category", as: :post_category | |
get "blog/category/:category/index.html" => "posts#by_category" | |
get "blog/page-:page/" => "posts#index", as: :blog | |
get "blog/page-:page/index.html" => "posts#index" | |
get "blog/:slug/" => "posts#by_slug", as: :post_slug | |
get "blog/:slug/index.html" => "posts#by_slug" | |
get "blog" => "posts#index", as: :blog | |
get "blog/index.html" => "posts#index" |
Thomas Mak thomas@cpttm.org.mo