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
function ghub() { | |
open "http://github.com/$1" | |
} | |
alias ghubdf='ghub dispatchio/frontend' | |
alias ghubdfi='ghub dispatchio/frontend/issues' | |
alias ghubdfp='ghub dispatchio/frontend/pulls' | |
alias ghubdb='ghub dispatchio/backend' | |
alias ghubdbi='ghub dispatchio/backend/issues' | |
alias ghubdbp='ghub dispatchio/backend/pulls' |
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
function ghub() { | |
open "http://github.com/$1" | |
} | |
# Convenience aliases to open the Backbone.js repo in Github | |
alias ghubdb='ghub documentcloud/backbone' | |
alias ghubdbi='ghub documentcloud/backbone/issues' | |
alias ghubdbp='ghub documentcloud/backbone/pulls' |
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
#!/usr/bin/env ruby | |
require 'time' | |
if ARGV.size < 2 | |
fail "Please supply shift modifier\n" + | |
"USAGE: ./caption_shifter <caption-input> <shift-modifier>\n" + | |
"EXAMPLE: ./caption_shifter html.vtt 2" | |
elsif ARGV.size < 1 | |
fail "Please supply caption file\n" + | |
"USAGE: ./caption_shifter <caption-input> <shift-modifier>\n" + |
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
function grepversion() { | |
if [[ -n "$1" ]]; then | |
local LOOKUP=Name | |
local APP=$1 | |
if [[ -n "$1" && -n "$2" ]]; then | |
if [[ "$1" == "code" ]]; then | |
LOOKUP=Code | |
fi | |
APP=$2 | |
fi |
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
// Example of calculating effective character level from a MUD. | |
// Single-classed character of level 20 would be level 20. | |
// Multi-classed character would gain an additional level for | |
// every 3 levels in their non-primary classes (primary class | |
// is highest level class). | |
// e.g. Mage: 30, Ranger: 5:, Thief: 9 # Effective Level: 34 | |
public int effectiveLevel() { | |
if (classes.size() == 1) { | |
return classes.get(0).level; | |
} |
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
public class MainActivity extends ListActivity { | |
private TweetAdapter adapter; | |
private Subscription subscription; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
adapter = new TweetAdapter(this); | |
setListAdapter(adapter); | |
loadTweets(); |
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
public Observable<List<Book>> books() { | |
return observablePlyFind(Book.class); | |
} | |
private static <T extends Model> Observable<List<T>> observableFromPlyQueryBuilder(final QueryBuilder<T> builder) { | |
return Observable.create(new Observable.OnSubscribe<List<T>>() { | |
@Override | |
public void call(Subscriber<? super List<T>> subscriber) { | |
subscriber.onNext(builder.find()); | |
subscriber.onCompleted(); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<shape xmlns:android="http://schemas.android.com/apk/res/android" | |
android:shape="rectangle"> | |
<solid android:color="#66000000"/> | |
<corners android:radius="4dp"/> | |
</shape> |