Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am tobrien on github.
* I am tobrien (https://keybase.io/tobrien) on keybase.
* I have a public key ASBB_iaLgD4jI3h2A-ZVaTptCBkrLl7zfpMalEkEH1J7YAo
To claim this, I am signing this object:
apply plugin: 'eclipse'
apply plugin: 'scala'
repositories {
mavenCentral()
}
dependencies {
compile 'org.scala-lang:scala-library:2.9.1'
}
@tobrien
tobrien / build.gradle
Created April 13, 2013 03:04
A Sample C/C++ Gradle Build referenced from
apply plugin: "cpp-exe"
executables {
main {
spec {
args "-fno-access-control", "-fconserve-space"
}
}
}
@tobrien
tobrien / build.gradle
Last active December 16, 2015 04:19
A Sample Android Gradle Build referenced from this blog entry: http://www.gradleware.com/news/blog/fighting-common-misconception-gradle-isnt-imperative
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.3'
}
}
apply plugin: 'android'
├── html
│   ├── contactadministrator.vm
│   ├── filtersubscription.vm
│   ├── includes
│   │   ├── emailconstants.vm
│   │   ├── fields
│   │   │   ├── affectsversions.vm
│   │   │   ├── assignee.vm
│   │   │   ├── attachments.vm
│   │   │   ├── changelog.vm
@tobrien
tobrien / build.gradle
Created April 12, 2013 21:33
This is a simple Scala build in Gradle. This particular build file ships with the Gradle distribution and it shows how declarative Gradle can be.
apply plugin: 'eclipse'
apply plugin: 'scala'
repositories {
mavenCentral()
}
dependencies {
compile 'org.scala-lang:scala-library:2.9.1'
}
ivy {
url "http://maven.java.net/content/groups/promoted/"
}
@tobrien
tobrien / query.py
Created October 26, 2012 14:40
Executing a SQLAlchemy Query against Akiban's Nested Resultsets
from sqlalchemy_akiban import nested
stmt = nested([order.c.ordernum, order.c.timestamp]).\
where(order.c.customer_id == customer.c.id)
stmt = select([customer.c.name, stmt.label('orders')])
for customer_row in connection.execute(stmt):
print "customer name:", customer_row['name']
for order_row in customer_row['orders']:
print "ordernum:", order_row['ordernum']
@tobrien
tobrien / nested-query.sql
Created August 8, 2012 20:38
Schema from Mongolabs Example
select
blog_post.id,
author.name,
author.email,
blog_post.date,
blog_post.rating,
(select
blog_comments.email as "user",
blog_comments.upvotes as "upVotes",
blog_comments.downvotes as "downVotes",
@tobrien
tobrien / build.gradle
Created July 10, 2012 12:53
Groovy Script to Automate Staging with Nexus Professional
import groovy.json.JsonSlurper
import groovy.json.JsonBuilder
apply plugin: 'java'
apply plugin: 'maven'
def repo = "http://localhost:8081/nexus/"
task stage_close(type: StagingCloseTask)
task stage_list(type: StagingListTask)