gem install rails --pre
rails new my_app -T
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
# Was asked how I keep my zshrc config sync'd between my computers with Dropbox | |
# Add a new directory in your Dropbox (or use an existing one) | |
mkdir -p ~/Dropbox/ohmyzsh | |
# move existing file to Dropbox | |
mv ~/.zshrc ~/Dropbox/ohmyzsh/zshrc | |
# symlink file back to your local directory | |
ln -s ~/Dropbox/ohmyzsh/zshrc ~/.zshrc |
Note: the original location of this article is on my blog, however, it is posted here too for better readability.
In this article, we will see how to use Core Data for accessing your API. We will use the Bandcamp API as our running example. I've only been experimenting with this code for a few days, so there might be mistakes in there.
The FAQ maintained by Github covers most stumbling blocks, some other tips and tricks supplied here.
Add _site
to .gitignore
. The generated site should not be uploaded to Github since its gets generated by github.
// | |
// Quick Hack to enable delete menu item | |
// Original blog post at http://mystcolor.me/post/26114988122/show-delete-menu-item-in-tableview | |
// | |
// Updated: 30 June 2012 | |
// I realized there should really be a more elegant way to | |
// send actions to responder chain, without manually looping | |
// through the responder chain. Here we implement the | |
// delete: method in both UITableViewCell and UITableView, so | |
// that they know the right thing to do in their own delete: |
Enable ‘Run’ in the ‘Build’ section of your test bundle’s scheme. (See http://www.raingrove.com/2012/03/28/running-ocunit-and-specta-tests-from-command-line.html)
$ gem install kicker open4 colored xcodebuild-rb
# based on https://gist.github.com/3349345 | |
# Thanks, @alloy! | |
# | |
# To get your project ready for this, you'll have to create a scheme for your unit test project, make sure run is checked in | |
# the build step, and then delete the Test Host setting. | |
# Also, make sure you have the colored and open4 gems installed. | |
require 'rubygems' | |
require 'colored' | |
require 'pathname' |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \
Here's an example of how to embed a Gist on GitHub Pages:
{% gist 5555251 %}
All you need to do is copy and paste the Gist's ID from the URL (here 5555251
), and add it to a gist
tag surrounded by {%
and %}
.