Skip to content

Instantly share code, notes, and snippets.

@benchonaut
Last active August 28, 2017 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benchonaut/c931e5bbfb3265c550d850f104d6db8a to your computer and use it in GitHub Desktop.
Save benchonaut/c931e5bbfb3265c550d850f104d6db8a to your computer and use it in GitHub Desktop.
scripts
#__pictures_by_camera() { mkdir pictures_by_camera/;find -type f|sort|uniq |grep -e jpg$ -e log$ -e LOG$ -e JPG |while read file;do ( file $file|grep EXIF|sed 's/: JPEG.\+//g';while read exiffile;do datebase=$(exiftool -t $exiffile |grep -e Date|base64 -w0 ) ; modelbase=$(exiftool -t $exiffile |grep -e Model|base64 -w0 );echo -ne "\n"$(echo $exiffile|sed 's/.\+\///g')"...d..."$(echo $datebase|md5sum|cut -d" " -f1)"...m..."$(echo $modelbase|md5sum|cut -d" " -f1)"\n$(echo $datebase|base64 -d|while read timestampline;do echo $timestampline|head -c8 ;echo "$timestampline"|cut -f2-;done)" & done ) ; done ; } ;
# y0pid() { $(hostname -a)"::"$(id -u|cut -d" " -f1;)"::==::"$(id -un)::$$ ; } ;
ytdlpts="--all-subs --xattrs --embed-subs --add-metadata --xattrs --prefer-avconv ";ytdlfrstrnpts=" --no-post-overwrites";
n3t_flickrhosts() { curl -k "https://www.flickr.com/help/test"|grep test.png|sed 's/href="/\nhref="/g'|grep ^href|cut -d"/" -f3|sort|uniq ; echo flickr.com;echo www.flickr.com ; } ;
t00ls_ytdlfmtlst() { youtube-dl -F "$1" ; } ;
t00ls_ytdlfmtlst_mp4_audio() { t00ls_ytdlfmtlst "$1"|grep -e mp4 -e "audio only" ; } ;
t00ls_ytdlfmtlst_mp4_bestandworst() { t00ls_ytdlfmtlst_mp4_audio "$1" |grep mp4 |sed -e 1b -e '$!d' ; } ;
t00ls_ytdlfmtlst_all_audio() { t00ls_ytdlfmtlst "$1" |grep "audio only " ; } ;
t00ls_ytdlfmtlst_all_video() { youtube-dl -F "$1" |grep -e video -e Video -e mp4 -e flv3 -e 3gp ; } ;
t00ls_ytdlfmtlst_useable_video() { t00ls_ytdlfmtlst_all_video "$1"|grep -e best -e DASH ; } ;
#t00ls_lhs__init-dirs() { cmd="mkdir ""-p"$(echo "~/.config_lhs_projects-pub " /res/disk_images.{insecu,secure} /res/.disk_images.secure |while read -d" " a;do echo $a;done) ; } ; t00ls_lhs__init() { test -f "~/.config_lhs_projects-pub" && echo asd || echo "no config file""~/.config_lhs_projects-pub"" found" ; } ; t00ls_lhs__init ;
#dev=ath9k-phy0;linux_leds_sys_gettrig() { cat /sys/class/leds/$1/trigger ; } ; linux_leds_sys_gettrig_cnt() { linux_leds_sys_gettrig $1 |wc -w ; } ; linux_leds_sys_gettrig $dev | sed 's/ /\n/g'|grep -v ^$|nl ;read trignum;echo -n $( linux_leds_sys_gettrig $dev | sed 's/ /\n/g'|grep -v ^$|head -n $trignum|tail -n1 ) > /sys/class/leds/$dev/trigger ;
//openwrt sender->send2muc->getfromrouter
#date_nongnu_utc() { date -u +%m%d%H%M%Y.%S ; } ;
#diffprintfvsecho() { echo "aaa"$NULL"bbb"\\0"ccc"'\\0'"ddd\0eee\\0"|ſ 's/\x00/NULNULLNULLL/g'|uniname -bcepu |md5sum;printf "aaa"$NULL"bbb"\\0"ccc"'\\0'"ddd\0eee\\0"|ſ 's/\x00/NULNULLNULLL/g'|uniname -bcepu |md5sum ; } ;
#alldiskids1() { ls -1fdi /dev/disk/*/* -f1d|sed 's/^ \+//g'|sort -n |uniq |grep -v ^$ ; } ; alldiskids1|cut -d" " -f1| while read inum;do echo "$inum .... finding orig dev"; echo find $(ls -1f /dev/sd* /dev/mmc* 2>/dev/null) -inum "$inum" ;done
#alldiskids() { ls -1fdi /dev/disk/*/* -f1d|sed 's/^ \+//g'|sort|uniq |grep -v ^$ } ; alldiskids| while read fileline;echo $fileline;name=$(echo "$fileline"|cut -d" " -f2-);inode=$(echo "$fileline"|cut -d" " -f1);do echo "$inum .... finding orig dev"; echo find $(ls -1f /dev/sd* /dev/mmc* 2>/dev/null) -inum "$inode" ;done
#__allneighbours() { (ip n;ip -6 n)|__linededup |grep -v FAILED$ ; } ;
mkdir -p /tmp/ramdisk-$(id -un)/openwrt/14.07;
cd /tmp/ramdisk-$(id -un)/openwrt/14.07;
wget -c -O- "http://downloads.openwrt.org/barrier_breaker/14.07/x86/generic/openwrt-x86-generic-Generic-rootfs.tar.gz"|sudo tar xvz|while read a ;do echo -ne $a"\r" & done ;
echo "date;mkdir -p /var/log /var/lock;opkg update;opkg install pv zram-swap kmod-zram imspector airpwn conntrack-tools conntrack-tools kmod-ipsec6 kmod-ipsec4 tstat serialoverip openssl-util gatling openvpn-openssl alfred peervpn prosody uhttpd tor socat sslh fastd openvpn nmap vpnc luci-i18n-openvpn-de mtr netstat-nat whob curlftpfs curl cjdns jamvm mysql-server owhttpd sqlite3-cli tor-geoip tor usb-modeswitch usbreset zoneinfo-europe zoneinfo-asia zoneinfo-northamerica zoneinfo-southamerica lvm2 mdadm tspc gogoc gw6c miredo tcpproxy owipcalc bash " |sudo chroot ./ /bin/ash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment