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
// ---- | |
// Sass (v3.3.10) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
.bar { | |
color: green; | |
} |
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
/** | |
* Usage: | |
console.viz("digraph foo { a -> b; }"); | |
*/ | |
(function(global) { | |
"use strict"; | |
if (!global.console) { | |
return; | |
} |
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
package com.noahsloan.grails.dwr; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
import java.util.Collection; | |
import java.util.Map; | |
import org.directwebremoting.convert.BeanConverter; | |
import org.directwebremoting.convert.CollectionConverter; | |
import org.directwebremoting.extend.InboundContext; |
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
// Church Encoding in Groovy | |
// Translated from http://meta-meta.blogspot.com/2007/06/church-code.html | |
def partial(c) { | |
return { a -> { b -> c(a,b) } } | |
} | |
T = partial { a,b -> a } | |
F = partial { a,b -> b } | |
def toBool(f) { |
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
// wait until the user pauses at least 500ms before doing validation | |
var timer; | |
$('.whatever').keypress(function() { | |
if(timer) clearTimeout(timer); | |
timer = setTimeout(validate,500); | |
}); |
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 android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; | |
/** | |
* Dear Android, why do I have to write this class myself? Is this to discourage SQL use? | |
*/ | |
public class QueryBuilder { | |
private String[] columns; | |
private boolean distinct; | |
private String table; |
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
<activity android:name=".MyAppRegisterAccount" | |
android:label="@string/addAccount" > | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW"/> | |
<category android:name="android.intent.category.DEFAULT"/> | |
<category android:name="android.intent.category.BROWSABLE"/> | |
<data android:scheme="myApp" /> | |
</intent-filter> | |
</activity> |
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
Intent intent = new Intent(Intent.ACTION_VIEW); | |
intent.setData(Uri.parse( | |
"http://gowalla.com/api/oauth/new?redirect_uri=myApp://register&client_id=12345")); | |
startActivity(intent); |
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
<div id="results"> | |
<forEach in="${results}"> | |
<div class="result">${result}</div> | |
</forEach> | |
</div> |
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
$('#results').load('/renderResults?page=2'); |
OlderNewer