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.hanhuy.android.irc | |
import model.BusEvent | |
import AndroidConversions._ | |
import android.os.{Handler, Looper} | |
import android.util.Log | |
import scala.collection.mutable.{ArrayBuffer,SynchronizedBuffer} | |
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 sbt._ | |
import sbt.Keys._ | |
import AndroidKeys._ | |
/* | |
* this represents a multi-project structure like: | |
* - root-project (wrapper/meta project) | |
* `- lite (android project) | |
* `- common (android library-project) |
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 AndroidKeys._ | |
libraryDependencies ++= Seq( | |
"com.pivotallabs" % "robolectric" % "1.1" % "test", | |
"junit" % "junit" % "4.8.2" % "test", | |
"xpp3" % "xpp3" % "1.1.4c" % "test", | |
"org.scalatest" %% "scalatest" % "1.7.1" % "test" | |
) | |
seq(androidBuildSettings: _*) |
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 org.scalatest.Suite | |
import org.scalatest.Reporter | |
import org.scalatest.Stopper | |
import org.scalatest.Filter | |
import org.scalatest.Tracker | |
import org.scalatest.Distributor | |
import com.xtremelabs.robolectric.Robolectric | |
import com.xtremelabs.robolectric.ApplicationResolver | |
import com.xtremelabs.robolectric.RobolectricConfig |
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
@echo off | |
setlocal | |
adb kill-server | |
adb start-server | |
for /f "delims=" %%i in ('adb jdwp') do set pid=%%i | |
adb -d forward tcp:29882 jdwp:%pid% | |
jdb -J-Duser.home=. -connect com.sun.jdi.SocketAttach:hostname=localhost,port=29882 -sourcepath %* |
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/python | |
import random | |
def simulate(): | |
start = 1200 | |
elo = start | |
elo40 = elo | |
elo100 = elo | |
elo500 = elo | |
k = 80 |
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.hanhuy.android.airshow | |
import java.net.{DatagramPacket, InetAddress, InetSocketAddress, DatagramSocket} | |
import java.nio.ByteBuffer | |
import java.nio.channels.DatagramChannel | |
import java.util.concurrent.TimeUnit | |
import android.content.res.Configuration | |
import android.graphics.Point | |
import android.hardware.display.VirtualDisplay |
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
pfnguyen@galactica1:~/src/ts$ sbt "gen-android android-22 m.m m" | |
[info] Loading global plugins from /home/pfnguyen/.sbt/0.13/plugins | |
[info] Set current project to ts (in build file:/cifs/pfnguyen/src/ts/) | |
[info] Creating project: m | |
Created directory /cifs/pfnguyen/src/ts/src/main/java | |
Created directory /cifs/pfnguyen/src/ts/src/main/java/m/m | |
Added file ./src/main/java/m/m/MainActivity.java | |
Created directory /cifs/pfnguyen/src/ts/src/androidTest/java | |
Created directory /cifs/pfnguyen/src/ts/src/androidTest/java/m/m | |
Added file ./src/androidTest/java/m/m/MainActivityTest.java |
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
> scripted | |
[info] :: delivering :: com.hanhuy.sbt#android-sdk-plugin;1.5.9-SNAPSHOT :: 1.5.9-SNAPSHOT :: integration :: Thu Nov 19 12:54:52 PST 2015 | |
[info] delivering ivy file to C:\Users\pfnguyen\src\sbt\target\scala-2.10\sbt-0.13\ivy-1.5.9-SNAPSHOT.xml | |
[info] Packaging C:\Users\pfnguyen\src\sbt\target\scala-2.10\sbt-0.13\android-sdk-plugin-1.5.9-SNAPSHOT.jar ... | |
[info] Done packaging. | |
[info] published android-sdk-plugin to C:\Users\pfnguyen\.ivy2\local\com.hanhuy.sbt\android-sdk-plugin\scala_2.10\sbt_0.13\1.5.9-SNAPSHOT\jars\android-sdk-plugin.jar | |
[info] published android-sdk-plugin to C:\Users\pfnguyen\.ivy2\local\com.hanhuy.sbt\android-sdk-plugin\scala_2.10\sbt_0.13\1.5.9-SNAPSHOT\srcs\android-sdk-plugin-sources.jar | |
[info] published android-sdk-plugin to C:\Users\pfnguyen\.ivy2\local\com.hanhuy.sbt\android-sdk-plugin\scala_2.10\sbt_0.13\1.5.9-SNAPSHOT\docs\android-sdk-plugin-javadoc.jar | |
[info] published ivy to C:\Users\pfnguyen\.ivy2\local\com.hanhuy.sbt\android-sdk-plugin\scala_2.10\sbt_0.13\1.5.9-S |
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
[pfnguyen@GALACTICA src] $ git clone https://github.com/jakewharton/u2020 | |
Cloning into 'u2020'... | |
remote: Counting objects: 3519, done. | |
emote: Total 3519 (delta 0), reused 0 (delta 0), pack-reused 3519 | |
Receiving objects: 100% (3519/3519), 8.96 MiB | 1.28 MiB/s, done. | |
Resolving deltas: 100% (1598/1598), done. | |
Checking connectivity... done. | |
[pfnguyen@GALACTICA src] $ cd u2020/ | |
[pfnguyen@GALACTICA u2020] $ mkdir project | |
[pfnguyen@GALACTICA u2020] $ echo 'addSbtPlugin("com.hanhuy.sbt" % "android-gradle-build" % "1.1.9")' > project/p.sbt |