Skip to content

Instantly share code, notes, and snippets.

View fishy's full-sized avatar

Yuxuan 'fishy' Wang fishy

View GitHub Profile
@fishy
fishy / ant-test.patch
Created October 20, 2011 13:50
The patch you'll need for "ant test" to run in ADT r14
diff --git a/build.xml b/build.xml
index 9315a5e..63a0bb0 100644
--- a/tools/ant/build.xml
+++ b/tools/ant/build.xml
@@ -1043,6 +1043,10 @@
<xpath input="${tested.project.absolute.dir}/AndroidManifest.xml"
expression="/manifest/@package" output="tested.manifest.package" />
+ <!-- Name of the application package extracted from manifest file -->
+ <xpath input="AndroidManifest.xml" expression="/manifest/@package"
#!/usr/bin/env python
import sys
import subprocess
import re
wanted = re.compile(re.compile(r'time=\d\d(\.\d*)? ms'))
host_pattern = 'a%d.phobos.apple.com'
cmd_pattern = 'ping -c 4 %s'
result = []
<?php
$shorten_prefix = "http://is.gd/api.php?longurl=";
$keyword = "longUrl";
echo ' { "results": {';
$params = explode('&', $_SERVER['QUERY_STRING']);
$first = true;
foreach($params as $param) {
if(preg_match("/^$keyword=(.*)/", $param, $match)) {
$url = $match[1];