Thomas Mak thomas@cpttm.org.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "UIDevice+hardware.h" | |
#include <sys/types.h> | |
#include <sys/sysctl.h> | |
@implementation UIDevice (Hardware) | |
/* | |
Platforms | |
iPhone1,1 -> iPhone 1G | |
iPhone1,2 -> iPhone 3G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body{ | |
background: transparent; | |
} | |
ul,li{ | |
margin:0; | |
list-style:none; | |
} | |
li { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"font_options": | |
[ | |
"no_antialias" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#content { | |
border: 2px solid green; | |
position: relative; | |
margin: 10px; | |
margin-top: 100px; | |
height: 24px; | |
line-height: 24px; | |
} | |
#content:after { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.next, .current { | |
transition: all 0.5s ease-out; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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" |
OlderNewer