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 net.oauth.OAuthAccessor; | |
import net.oauth.OAuthConsumer; | |
import net.oauth.OAuthServiceProvider; | |
import net.oauth.client.OAuthClient; | |
import net.oauth.client.httpclient4.HttpClient4; | |
public class Main { | |
public static void main(String[] args) throws Exception { | |
String consumerKey = "<KEY>"; |
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
/* | |
* Copyright 2010, Novoda ltd | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 novoda.mixin; | |
public class TestMixin extends Mixable implements WithTest { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
TestMixin mixin = new TestMixin(); | |
mixin.sayHello("test"); | |
} |
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
sequential ^ | |
"""Given the following json {"test": "value"}""" ! c1.getJson^ | |
"""When applying jsonpath test"""! c1.getQuery^ | |
"""Then I should get value"""! c1.checkResutl^ | |
end | |
... | |
"""Given the following json {"test": [2]}""" | |
"""When applying jsonpath test""" | |
"""And applying jsonpath [#]""" |
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 java.text.SimpleDateFormat | |
import java.util.Date | |
class RichHumanDate(d:Long) { | |
def toHumanString() = { | |
val sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss.SSS"); | |
val dt = new Date(d); | |
sdf.format(dt); | |
} | |
} |
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 java.text.SimpleDateFormat | |
import java.util.Date | |
class RichHumanDate(d:Long) { | |
def toHumanString() = { | |
val sdf = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss.SSS"); | |
val dt = new Date(d); | |
sdf.format(dt); | |
} | |
} |
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
trait AndroidDeviceAction | |
case class Install extends AndroidDeviceAction | |
case class Instrument(options:InstrumentOptions) extends AndroidDeviceAction | |
case class Monkey extends AndroidDeviceAction | |
case class MoneyScript(script:Script) extends AndroidDeviceAction | |
class AndroidDevice extends Actor with IDevice { | |
def receive = { | |
case Install => // install app | |
case Instrument => |
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/ruby | |
require 'rubygems' | |
require 'git' | |
g = Git.open(".") | |
log = g.log(10000) | |
c = log.collect {|l| l.date.yday} | |
(commit_count = {}).default = 0 | |
c.each {|e| commit_count[e] += 1} |
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.hello | |
import java.lang.String | |
import android.net.Uri | |
import com.android.dx.dex.DexOptions | |
import com.android.dx.dex.file.DexFile | |
import dalvik.system.DexClassLoader | |
import java.io.{PrintWriter, FileInputStream, FileOutputStream, File} | |
import com.android.dx.dex.cf.{CfOptions, CfTranslator} |
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 org.scalatest.tools | |
import org.scalatest._ | |
import dalvik.system.DexFile | |
import java.io.File | |
import android.os.{Looper, Bundle} | |
import android.test.{AndroidTestCase, InstrumentationTestCase} | |
import scala.collection.JavaConversions._ | |
import android.app.{Activity, Instrumentation} |
OlderNewer