date with unix timestamp 
date in unix timestamp: date +%s

convert unix timestamp to date: date --date "Jan 1, 1970 00:00:00 +0000 + $1 seconds"

set date with unix timestamp: date -s "Jan 1, 1970 00:00:00 +0000 + $1 seconds"


[ view entry ] ( 754 views )   |  print article
quick base64 encode/decode 
perl -MMIME::Base64 -e 'print encode_base64("string");'

perl -MMIME::Base64 -e 'print decode_base64("c3RyaW5n");'

[ view entry ] ( 571 views )   |  print article
usbmonitor libusb usbsniff 
Linux Kernel:

modprobe usbmon
mount -t debugfs none_debugs /sys/kernel/debug
cat /sys/kernel/debug/usbmon/<x>t (x=Gerätenummer 1,2,3,...)

libusb with radare/libusbsniff:
LD_PRELOAD=/usr/lib/libusbsniff.so ./my-usb-program


[ view entry ] ( 706 views )   |  print article
whiptail 
this one-liner has following benefits:

* restart if pressing ESC (while ! ... ; do true; done)

* store result in a variable not a file (whiptail ... 3>&1 1>&2 2>&3)
while ! choosen=$(whiptail --nocancel --noitem --radiolist "Please choose" \
10 19 3 1 1 2 0 3 0 3>&1 1>&2 2>&3); do true; done


[ view entry ] ( 800 views )   |  print article

<<First <Back | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |