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
/* usbreset -- send a USB port reset to a USB device | |
* | |
* Compile using: gcc -o usbreset usbreset.c | |
* | |
* | |
* */ | |
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 | |
# Disables the adb timeout | |
set -e | |
ADB=${ADB:-adb} | |
$ADB wait-for-device | |
B2G_PREF_DIR=/system/b2g/defaults/pref | |
TMP_DIR=/tmp/adb-timeout-prefs | |
rm -rf $TMP_DIR |
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 json | |
import sys, string, os | |
import shutil | |
webapps_dir = sys.argv[1] | |
webapps_filename = os.path.join(webapps_dir, "webapps.json") | |
webapps = json.load(open(webapps_filename)) |
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/sh | |
if [ ! -f busybox-armv6l ] | |
then | |
wget "http://busybox.net/downloads/binaries/1.19.0/busybox-armv6l" | |
fi | |
adb remount | |
adb push busybox-armv6l /system/bin/busybox | |
adb shell 'cd /system/bin; chmod 555 busybox; for x in `./busybox --list`; do ln -s ./busybox $x; 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
$(info Executing GNUmakefile) | |
#BOARD = STM32F7DISC | |
BOARD = STM32F429DISC | |
#BOARD = PYBV10 | |
$(info BOARD = $(BOARD)) | |
DFU_UTIL = dfu-util -s :leave | |
USE_PYDFU = 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
#!/system/bin/sh | |
# | |
# Constants from include/linux/input.h | |
EV_SYN=0 | |
EV_ABS=3 | |
SYN_REPORT=0 | |
SYN_MT_REPORT=2 | |
ABS_MT_TOUCH_MAJOR=48 # 0x30 |
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
#!/system/bin/sh | |
# | |
# Constants from include/linux/input.h | |
EV_SYN=0 | |
EV_ABS=3 | |
SYN_REPORT=0 | |
ABS_MT_TOUCH_MAJOR=48 | |
ABS_MT_POSITION_X=53 |
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 code relies on the Arbotix class and the SerialLink class from the | |
% Robotics Toolbox, which can be found here: | |
% http://petercorke.com/Robotics_Toolbox.html | |
addpath(fullfile( fileparts(which('startup_rvc')), 'robot', 'interfaces')) | |
% This was using a direct USB to bioloid interface, so we run it at | |
% 1 Mbit/sec | |
arb = Arbotix('port', '/dev/ttyUSB0', 'baud', 1000000, 'nservos', 2); |
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/sh | |
# Script to enable/disable OMTC | |
# Make disable-omtc a symlink to enable-omtc | |
#set -x | |
script_name=$(basename $0) | |
ENABLE_OMTC=/tmp/enable-omtc | |
DISABLE_OMTC=/tmp/disable-omtc | |
LOCAL_PREFS_JS=/tmp/prefs.js |
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 python3 | |
import grp | |
import os | |
import pwd | |
import stat | |
import sys | |
import time | |
SIX_MONTHS = 6 * 30 * 86400 |
NewerOlder