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
## resulting filename 20121018-102347-IMG_4743.jpg | |
## rename pictures | |
jhead -n%Y%m%d-%H%M%S-%f *.JPG | tee rename.log | |
## create restore script | |
awk '{ print "mv " $3 " " $1 }' rename.log >rename_undo.sh | |
## rename movies | |
stat -t"%Y%m%d-%H%M%S" *.MOV | awk '{ print "echo mv " $16 " " $10"-"$16 }' | sh | tee rename-mov.log | sh -x |
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
<!-- xbmc Remote --> | |
<keymap> | |
<global> | |
<remote> | |
<skipminus>back</skipminus> | |
<skipplus>ContextMenu</skipplus> | |
<!--stop>XBMC.ActivateWindow(Home)</stop--> | |
<pause>FullScreen</pause> | |
</remote> | |
</global> |
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
/* | |
* Building: cc -o com com.c | |
* Usage : ./com /dev/device [speed] | |
* Example : ./com /dev/ttyS0 [115200] | |
* Keys : Ctrl-A - exit, Ctrl-X - display control lines status | |
* Darcs : darcs get http://tinyserial.sf.net/ | |
* Homepage: http://tinyserial.sourceforge.net | |
* Version : 2007-07-31 | |
* | |
* Ivan Tikhonov, http://www.brokestream.com, [email protected] |
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
description "netatalk afp Server" | |
author "Bjoern Riemer <bjoern.riemer-ät-web.de>" | |
start on (local-filesystems and net-device-up and started avahi-daemon) | |
#start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
expect daemon |
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
path pre_shared_key "/etc/racoon/psk.txt"; | |
path certificate "/etc/racoon/certs"; | |
timer { | |
# NOTE: varies between carriers | |
natt_keepalive 45 sec; | |
} | |
listen { | |
isakmp 78.47.68.26[500]; | |
isakmp_natt 78.47.68.26[4500]; |
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
git clone qt | |
git checkout stable | |
perl init-repository -no-webkit | |
./configure -opensource -confirm-license -no-accessibility -qt-sql-sqlite -qt-zlib -no-gif -no-libpng -no-libjpeg -nomake examples -no-gui -nomake tools -no-opengl -no-sm -no-xshape -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-fontconfig -no-xkb -no-glib -openssl-linked -no-dbus -static -prefix /opt/Qt-5.3.1-static -no-xcb -no-eglfs -no-kms -no-directfb -no-linuxfb -no-cups -no-iconv -no-alsa | |
make -j 4 | |
cd qtbase | |
make install | |
cd ../qtscript | |
make -j 4 |
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
#include <stdio.h> | |
void hexdump_bytes(unsigned char *src, unsigned cnt, unsigned addr) | |
{ | |
unsigned char *p = src; | |
int i; | |
while (cnt >= 16) { | |
printf("%08x: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", addr, | |
p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8], p[9], p[10], p[11], p[12], p[13], p[14], p[15]); | |
p += 16; |
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
#copied from http://ctfcrew.org/writeup/90 | |
f = open('openwrt-wrtsl54gs-squashfs.hex', 'r') | |
w = open('openwrt-wrtsl54gs-squashfs.bin', 'wb') | |
lines = f.readlines() | |
for l in lines: | |
w.write(l.strip('\n').decode('hex')) | |
w.close() |
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 | |
# author [email protected] | |
TEMP=`getopt -o vt: --long target -n 'example.bash' -- "$@"` | |
if [ $? != 0 ] ; then echo "getopt fail, terminating..." >&2 ; exit 1 ; fi | |
# Note the quotes around `$TEMP': they are essential! | |
eval set -- "$TEMP" | |
Usage() { |
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
sudo docker run --rm -it --env=XAUTHORITY=/tmp/.docker.xauth -v /tmp/.docker.xauth:/tmp/.docker.xauth -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device /dev/dri --name visualstudio jess/visualstudio |
OlderNewer