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
#!/bin/bash | |
# Add this to your ~/.bash_profile | |
for a in `ls $HOME/.bash_profile.d/*.sh`; do | |
source $a | |
done |
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
SunSpider tests - higher is better | |
Rhino (Interpreted) | |
------------------- | |
Score: 362 | |
Richards: 425 | |
DeltaBlue: 340 | |
Crypto: 369 | |
RayTrace: 535 |
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
var win = Ti.UI.createWindow({ | |
backgroundColor: 'white', | |
top: 0, left: 0, right: 0, bottom: 0, | |
layout: "vertical" | |
}); | |
var button = Ti.UI.createButton({ | |
title: "click me" | |
}); | |
win.add(button); |
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
# | |
# Kill a running Android JDWP (debuggable) process without Eclipse | |
# | |
import sys | |
import socket | |
import struct | |
import uuid | |
import random | |
import subprocess |
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
// | |
// !!WARNING: Not recommended for production code!! | |
// | |
public class ClassLoaderActivity extends Activity | |
{ | |
public void onCreate(Bundle savedInstanceState) | |
{ | |
// file.jar has a dex'd "classes.dex" entry that you can generate with "dx" from any number of JARs or class files | |
ClassLoader dexLoader = new DexClassLoader("/path/to/file.jar", getCacheDir().getAbsolutePath(), null, getClassLoader()); | |
setAPKClassLoader(dexLoader); |
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
var activity = Ti.Android.currentActivity; | |
var win = Ti.UI.currentWindow; | |
activity.addEventListener("create", function(e) { | |
var button = Ti.UI.createButton({title: "Hello world"}); | |
button.addEventListener("click", function(e) { | |
activity.finish(); | |
}); | |
win.add(button); | |
}); |
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
var win = Ti.UI.createWindow({ | |
backgroundColor: 'blue', | |
top: 0, left: 0, right: 0, bottom: 0 | |
}); | |
var view = Ti.UI.createView(); | |
win.add(view); | |
var createButton = Ti.UI.createButton({ | |
top: 0, right: 0, height: "5%", |
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
bz_create_patch() { | |
rev=HEAD^ | |
if [ "$1" != "" ]; then | |
rev=$1 | |
fi | |
git format-patch -k --no-stat --no-signature $rev --stdout | git patch-to-hg-patch | |
} |
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
/* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | |
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
// getNetworks() can take some time.. | |
MARIONETTE_TIMEOUT = 60000; | |
const WHITELIST_PREF = "dom.mobileconnection.whitelist"; | |
let uriPrePath = window.location.protocol + "//" + window.location.host; | |
SpecialPowers.setCharPref(WHITELIST_PREF, uriPrePath); |
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
# HG changeset patch | |
# User Marshall Culpepper <marshall@mozilla.com> | |
Bug 759637: Initial implementation of MobileConnection network selection APIs. r=philikon sr=sicking | |
diff --git a/dom/network/interfaces/nsIDOMMobileConnection.idl b/dom/network/interfaces/nsIDOMMobileConnection.idl | |
index 1df7131..ef434cd 100644 | |
--- a/dom/network/interfaces/nsIDOMMobileConnection.idl | |
+++ b/dom/network/interfaces/nsIDOMMobileConnection.idl | |
@@ -31,17 +31,52 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget |