Operation | Webdav | REST |
---|
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
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++ ){ |
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 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 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 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 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 sys | |
import json | |
def expand_stack(data, count): | |
# detect stack | |
message = data['message'] | |
stack_start = message.find('[{'); |
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 | |
TEST_SUITE="$1" | |
SEARCH_FOLDERS="apps/*/tests tests/lib tests/unit" | |
if test -z "$TEST_SUITE"; then | |
if test -r Makefile; then | |
make test-php TEST_DATABASE=sqlite 2>&1 | tee octest.log | |
else |
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 | |
# replace accordingly | |
NC_URL="https://localhost" | |
USERS=(alice bob charles dave) | |
PASSWORD=test | |
EXPRESSIONS=("hello" "hello!" "goodbye" "bye" "how are you" "good, thank you") | |
while true; |
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 | |
shopt -s nullglob | |
INPUT_DIR="$1" | |
OUTPUT_DIR="$INPUT_DIR"/out | |
TARGET_DIR="$2" | |
function syntax | |
{ | |
echo "nc_export_pics /path/to/input /path/to/output" >&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/bash | |
NC_URL="https://nchost" | |
USERS=(alice bob charles dave) | |
PASSWORD=passwordcomeshere | |
C=1 | |
SPECIFIC_ROOM="$1" |
OlderNewer