This file contains hidden or 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 | |
# Inspired by http://www.devthought.com/code/create-a-github-pull-request-from-the-terminal/ | |
targetbranch=master | |
if test "$1"; then | |
targetbranch=$1 | |
fi | |
repo=`git remote -v | grep -m 1 "(push)" | sed -e "s/.*github.com[:/]\(.*\)\.git.*/\1/"` |
This file contains hidden or 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
# set this to your Torchlight directory | |
TORCHLIGHTDIR=$HOME/games/Torchlight | |
hg clone http://hg.libsdl.org/SDL | |
# check out the revision before the one that introduces the bug as advised here: http://forums.runicgames.com/viewtopic.php?f=24&t=33360&start=60#p474739 | |
hg up 4de584a3a027 --clean | |
# Fix X11 compilation issues with another changeset | |
hg export 6caad66a4966 > patch | |
hg import patch |
This file contains hidden or 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 os | |
import struct | |
from fcntl import ioctl | |
def __ioctl_val(val): | |
# workaround for OverFlow bug in python 2.4 | |
if val & 0x80000000: | |
return -((val^0xffffffff)+1) |
This file contains hidden or 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
public boolean onTouchEvent(MotionEvent m) { | |
int pointerCount = m.getPointerCount(); | |
int action = m.getActionMasked(); | |
String actionString; | |
if ( action == MotionEvent.ACTION_MOVE ){ | |
// we don't know which one moved, so process them all | |
for ( int i = 0; i < pointerCount; i++ ){ |
NewerOlder