Skip to content

Instantly share code, notes, and snippets.

if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew update
brew install coreutils
brew install findutils
brew install bash
@ducky-hong
ducky-hong / css
Created August 7, 2012 07:24
simple expandable/collapsible list based on (http://jasalguero.com/ledld/development/web/expandable-list/)
body {
font-size: 16px;
padding: 0;
margin: 0;
}
ul, li {
list-style: none;
margin:0;
padding:0;
@ducky-hong
ducky-hong / gist:2394933
Created April 15, 2012 21:38
Simple container for checked items for the android list view. With the 'Rule', you could control the checked state of a certain item.
public class CheckedItemData {
SparseBooleanArray mCheckedItemStates = new SparseBooleanArray();
LinkedList<Rule> mRules = new LinkedList<Rule>();
public void addRule(Rule rule) {
mRules.add(rule);
}
public int getCount() {
@ducky-hong
ducky-hong / gist:2384691
Created April 14, 2012 14:17
간단한 369 게임
def start(limit: Int) {
1 to limit foreach {
x => val c = x.toString count ("369" contains _)
println ( if (c > 0) "clap! " * c ; else x )
}
}