Skip to content

Instantly share code, notes, and snippets.

Gavin Schulz gsmaverick

Block or report user

Report or block gsmaverick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View controller.scala
import S3File
object HelloWorldController extends Controller {
def index = {
val file = S3File("id", "path/to/file")
val json = Json.toJson(file)(S3File.linkSigningS3FileWrites)
Ok(json)
}
}
View link-signing-writes.scala
View file.scala
case class S3File(id: String, path: String)
object S3File {
implicit def s3FileFormat: Format[S3File] = Json.format[S3File]
def generateSignedLink(path: String): String = ???
}
View spec.wren.dart
// Simple unit testing in wren.
class Spec {
new(description, body) {
_description = description
if (_body.type == Fiber){
_body = body
} else {
_body = new Fiber(body)
@gsmaverick
gsmaverick / spec.wren.dart
Created Jan 18, 2015
Simple unit testing in wren.
View spec.wren.dart
// Simple unit testing in wren.
class Spec {
new(description, body) {
_description = description
_body = body
}
description { _description }
@gsmaverick
gsmaverick / spec.wren
Created Jan 18, 2015
Simple unit testing in wren.
View spec.wren
// Simple unit testing in wren.
class Spec {
new(description, body) {
_description = description
_body = body
}
description { _description }
@gsmaverick
gsmaverick / spec.wren
Last active Aug 29, 2015
Simple unit testing in wren.
View spec.wren
// Simple unit testing in wren.
class Spec {
new(description, body) {
_description = description
_body = body
}
description { _description }
View gist:5228688
// The prototypes you added
MC.View = Backbone.View;
MC.View.prototype.Terms = Terms.m;
MC.View.prototype.formats = formats;
// In your view:
render : function() {
this.$el.html(this.template({
terms: this.Terms
// Put any other data you want in your template inside this object as well
View data.csv
premise Infractions
1351 76
217 75
733 64
2181 64
1022 62
2249 60
416 58
929 56
1158 56
View data.csv
premise Infractions
1351 76
217 75
733 64
2181 64
1022 62
2249 60
416 58
929 56
1158 56
You can’t perform that action at this time.