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/zsh | |
#DEPRECATED | |
#get size of package(s) in arch (specify none for all) | |
pacman -Si "$@" | awk -F ": " '/^Name/ {name=$2} /^Installed Size/ {printf "%s %d KiB\n", name, $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
#!/usr/bin/zsh | |
# dwb: sP | |
echo -En "js var F,j,f,i;F=document.forms;for(j=0;j<F.length;++j){f=F[j];for(i=0;i<f.length;++i){if(f.elements[i].type.toLowerCase()=='password'){f.elements[i].type='text';f.elements[i].pwmarker='true'}else if(f.elements[i].pwmarker=='true'){f.elements[i].type='password'}else{}}};" > ${DWB_FIFO} |
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/zsh | |
# dwb: sp | |
echo -En "js var F,j,f,i;var s=new Array();F=document.forms;for(j=0;j<F.length;++j){f=F[j];for(i=0;i<f.length;++i){if(f.elements[i].type.toLowerCase()=='password'){s.push(f.elements[i].value)}}}if(s.length>0){alert('Passwords in forms on this page:\n\n'+s.join('\n'))}else{alert('There are no passwords in forms on this page.')};" > ${DWB_FIFO} |
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/bash | |
find "$1" -mindepth 1 -maxdepth 1 -print0 | xargs -0 mv -t . |
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/python3 | |
#Extract xml file from iTunes subscribe bullshit | |
''' | |
That is, take a subscribe page | |
(e.g., http://itunes.apple.com/us/podcast/a-state-trance-official-podcast/id260190086) | |
and find the original xml playlist, so you don't have to have iShit or w/e. | |
''' | |
import sys,urllib.parse,urllib.request | |
import xml.parsers.expat |
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/python3 | |
#Split bills according to payment weights | |
#how much each person paid and weight of person | |
amts={} | |
while True: | |
label=input("\nperson: ") | |
if label == "": | |
break | |
else: | |
amt=0 |
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
===== .CONKYRC ====== | |
out_to_x no | |
background no | |
cpu_avg_samples 2 | |
net_avg_samples 2 | |
no_buffers yes | |
out_to_console yes | |
out_to_stderr no | |
extra_newline no | |
update_interval 1.0 |
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 | |
# manage truecrypt containers using tcplay | |
cryptdev="/dev/disk/by-id/usb-Ut165_USB2FlashStorage_19211326100935920031-0:0" | |
cryptmap=truecrypt | |
mountpt=/mnt/"$cryptmap" | |
# must be run as root | |
if [[ $EUID != 0 ]]; then | |
printf "%s\n" "You must be root to run this." |
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/zsh | |
#Simple script to extract audio from a file. | |
FILE="$1" | |
FILENAME="${FILE%.*}" | |
EXTENSION=`ffmpeg -i "$1" 2>&1 | gawk '/Audio/ {print $4}' | tr -d '[:punct:]'` | |
ffmpeg -vn -i "$1" -acodec copy "$FILENAME"."$EXTENSION" |
OlderNewer