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/env python | |
import sys | |
import gtk | |
from gtk import gdk | |
import webkit | |
import gobject | |
page_url = len(sys.argv)>1 and sys.argv[1] or 'http://www.google.com' | |
gobject.threads_init() | |
win = gtk.Window() |
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
#1 create fresh git clone | |
#2 track all remote branches | |
for b in `git branch -r | sed "s/ origin\///g"`; do git branch $b -t origin/$b; 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
# Display a list of all connected Android devices | |
# Set ANDROID_SERIAL environment from selected item | |
# Example of use : # adb-setdev && adb install -r myapp.apk | |
function adb-setdev() | |
{ | |
devices=($(adb devices|grep "device$"|cut -f1)) | |
devices_count=${#devices[*]} | |
if [ "$devices_count" -eq "0" ] | |
then | |
unset ANDROID_SERIAL |
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/env python | |
# | |
# Converts color codes from text to html | |
# so that colors can be visible in a browser | |
# | |
import re | |
import sys | |
HTML_START="<html><head /><body><pre>" |
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.vsct; | |
import org.junit.Test; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.concurrent.TimeUnit; | |
import static org.junit.Assert.assertEquals; |
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.lang.reflect.InvocationHandler; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
public class DynamicProxy { | |
private static final InvocationHandler INVOKE_DO_NOTHING = new InvocationHandler() { | |
@Override | |
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { | |
return null; |
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 | |
# Find Unused (unreferences) layouts in android project | |
for f in `find ./src -iname "*.xml" | grep res/layout`; do echo $f ; git grep --count -e "R\.layout\.$(basename $f .xml)\W" --or -e "@layout/$(basename $f .xml)\W" | wc -l ; done | grep -B1 "^0" |
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
# Display a list of all installed avd, | |
# prompt user to select, | |
# then run emulator with option -avd set | |
# Example of use : # emulator-avd | |
function emulator-avd() | |
{ | |
avds=($(for f in `find ~/.android/avd/*.ini -iname "*.ini"`; do echo `basename $f .ini`; done)) | |
select avd in ${avds[*]} | |
do |
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
<keymap version="1" name="Default for XWin FR" parent="Default for XWin"> | |
<action id="ActivateAndroidMonitorToolWindow"> | |
<keyboard-shortcut first-keystroke="alt 6" /> | |
<keyboard-shortcut first-keystroke="alt minus" /> | |
</action> | |
<action id="ActivateChangesToolWindow"> | |
<keyboard-shortcut first-keystroke="alt 9" /> | |
<keyboard-shortcut first-keystroke="alt #10000c7" /> | |
</action> | |
<action id="ActivateDebugToolWindow"> |
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
<keymap version="1" name="Default for GNOME FR" parent="Default for GNOME"> | |
<action id="ActivateAndroidMonitorToolWindow"> | |
<keyboard-shortcut first-keystroke="alt 6" /> | |
<keyboard-shortcut first-keystroke="alt minus" /> | |
</action> | |
<action id="ActivateChangesToolWindow"> | |
<keyboard-shortcut first-keystroke="alt 9" /> | |
<keyboard-shortcut first-keystroke="alt #10000c7" /> | |
</action> | |
<action id="ActivateDebugToolWindow"> |
OlderNewer