Skip to content

Instantly share code, notes, and snippets.

@thomas479
thomas479 / pull.sh
Last active December 29, 2024 19:03
Android adb pull all files as tar
adb exec-out 'tar --dereference --create --exclude=sdcard/Android/data/com.spotify.music/ \
sdcard/ 2>/sdcard/backup-errors.txt' | \
dd of=backup-$(date +%Y%m%d).tar && \
adb shell cat /sdcard/backup-errors.txt
@thomas479
thomas479 / git.md
Created August 22, 2017 06:08
Create update.zip of current branch (with complete folderstructure)

git archive -o update.zip HEAD $(git diff --name-only [hash_from_where_to_build_zip] --diff-filter=ACMRTUXB)

@thomas479
thomas479 / TimeZoneInfo.md
Last active February 21, 2017 14:27
Timezone names from TimeZoneInfo (.NET)
StandardName UTC Offset
Dateline Standard Time -12:00:00
UTC-11 -11:00:00
Aleutian Standard Time -10:00:00
Hawaiian Standard Time -10:00:00
Marquesas Standard Time -09:30:00
Alaskan Standard Time -09:00:00
UTC-09 -09:00:00
Pacific Standard Time (Mexico) -08:00:00
@thomas479
thomas479 / number_decimal_dot_and_comma.js
Created July 21, 2016 07:14
JQuery validator number extention. Allows both the decimal dot and decimal comma.
$.extend( $.validator.methods, {
number: function( value, element ) {
var result = false;
if(/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:,\d+)?$/.test( value )){
result = true;
} else if(/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test( value )){
result = true;
}
return this.optional( element ) || result;
}