diff --git a/local/bin/.gitignore b/local/bin/.gitignore index e1f2f61..971f683 100644 --- a/local/bin/.gitignore +++ b/local/bin/.gitignore @@ -1,6 +1,5 @@ # Some actual binary files -automat-visualize cabal ctags dmenu @@ -10,10 +9,8 @@ dvtm* dwm gloss-juicy-viewer hlint -html2text jshon notmuch -pygmentize rbenv readtags sent @@ -30,31 +27,3 @@ wjt # shouldn't share this one with the world macaddress -# garbage -chardetect -easy_install -easy_install-2.7 -epylint -f2py -isort -jsonschema -pybabel -pylint -pyreverse -rst2html.py -rst2html4.py -rst2html5.py -rst2latex.py -rst2man.py -rst2odt.py -rst2odt_prepstyles.py -rst2pseudoxml.py -rst2s5.py -rst2xetex.py -rst2xml.py -rstpep2html.py -sphinx-apidoc -sphinx-autogen -sphinx-build -sphinx-quickstart -symilar diff --git a/local/bin/maintain b/local/bin/maintain deleted file mode 100755 index 3d222a8..0000000 --- a/local/bin/maintain +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -cd /data/programming/void-packages - -./xbps-src update-check notmuch -./xbps-src update-check kcov -./xbps-src update-check qutebrowser -./xbps-src update-check ranger -./xbps-src update-check escrotum - diff --git a/local/bin/noise b/local/bin/noise deleted file mode 100755 index fcad724..0000000 --- a/local/bin/noise +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -case "$1" in - "binaural") play -n -t sl - synth sine %-29 sine %-30 ;; - "brown"|*) play -t sl - synth brownnoise band -n 1200 200 tremolo 20 .1 < /dev/zero ;; -esac diff --git a/local/bin/pdf-stapler b/local/bin/pdf-stapler deleted file mode 100755 index 3c5f82c..0000000 --- a/local/bin/pdf-stapler +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python2 - -# -*- coding: utf-8 -*- -import re -import sys - -from staplelib import main - -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/local/bin/plop.mp3 b/local/bin/plop.mp3 deleted file mode 100644 index 7b46882..0000000 Binary files a/local/bin/plop.mp3 and /dev/null differ diff --git a/local/bin/push.sh b/local/bin/push.sh deleted file mode 100755 index 9c7a758..0000000 --- a/local/bin/push.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Thanks to noctua for the base script -# Thanks to Iasoon for the advanced ssh config parsing -set -e - -sshhost="Flesje" -fles="http://r2t2.be" - -# Find ssh username -user=$( - # Join config entries - sed -n '$!{/host /I!{H;d}};x;s/\n/ /g;p' $HOME/.ssh/config | - # Extract user/host combinations - grep -i 'user' | tr -s ' ' ' ' | - sed 's/^.*host \([^ \t]\+\).*user \([^ \t]\+\).*$/\1 \2/I' | - # Find user - (grep "^$sshhost" || echo $USER) | cut -d ' ' -f 2 ) - -file="$(mktemp XXXXXX.png)" -escrotum $* "$file" -chmod 644 $file -scp -p $file $sshhost:~/images/ -rm "$file" -url="$fles/~$user/$file" -notify-send "Screenshot uploaded to $url" -echo "$url" | xclip diff --git a/local/bin/pwcalc.sh b/local/bin/pwcalc.sh deleted file mode 100755 index a3833f0..0000000 --- a/local/bin/pwcalc.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# Reading input {{{ - -# Terminal -#read -p "Alias: " alias_ -#read -s -p "Secret: " secret - -# GUI -alias_="$(zenity --password --title="Password Calculator - Alias" 2> /dev/null)" -secret="$(zenity --password --title="Password Calculator - Secret" 2> /dev/null)" - -pass="$(echo -n "$secret$alias_" | shasum | sed 's/../\\\\x&/g' | xargs echo -e | base64 | colrm 17)" - -echo -n "$pass" | xclip -echo -n "$pass" | xclip -sel c -notify-send "xclip set to ${pass:0:3}...${pass:(-3):3}" - -sleep 2 -cat -A /dev/urandom | head -c10 | xclip -cat -A /dev/urandom | head -c10 | xclip -sel c -notify-send "cleaned xclip" - diff --git a/local/bin/sound_control.sh b/local/bin/sound_control.sh deleted file mode 100755 index f1a7ee0..0000000 --- a/local/bin/sound_control.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -command="${1:=toggle}" - -current="$(amixer get Master | sed -n '/%/s/.*\[\(.*\)%\].*/\1/p' | head -1)" - -case $command in - toggle) amixer -q set Master toggle ;; - down) amixer -q set Master "$((current - 5))%" ;; - up) amixer -q set Master "$((current + 5))%" ;; - *) notify-send "learn to volume" ;; -esac - -sound_notification.sh - diff --git a/local/bin/sound_notification.sh b/local/bin/sound_notification.sh deleted file mode 100755 index 53ba830..0000000 --- a/local/bin/sound_notification.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -mpv $HOME/.local/bin/plop.mp3 - diff --git a/local/bin/stapler b/local/bin/stapler deleted file mode 100755 index 3c5f82c..0000000 --- a/local/bin/stapler +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python2 - -# -*- coding: utf-8 -*- -import re -import sys - -from staplelib import main - -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/local/bin/titlefilter.py b/local/bin/titlefilter.py deleted file mode 100755 index e2b72c1..0000000 --- a/local/bin/titlefilter.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/env python3 -# Filter items not containing keywords (given as parameters) from a rss feed. -# Reads stdin, writes stdout. - -import sys - -# The hard way, pretty clean but doesn't work (probably) because HTMLParser puts -# all the tags in lowercase. - -#from html.parser import HTMLParser -#from itertools import chain - -#def start_to_tag(tag, attrs, end=False): -# if end: -# items = chain([tag], ('{}="{}"'.format(n,v) for (n,v) in attrs), ['/']) -# else: -# items = chain([tag], ('{}="{}"'.format(n,v) for (n,v) in attrs)) -# return "<{}>".format(" ".join(items)) -# -#class FeedParser(HTMLParser): -# -# def __init__(self, keep): -# super().__init__(self) -# self.keep = keep -# self.parts = [] -# self.item = None -# -# def handle_starttag(self, tag, attrs, end=False): -# string = start_to_tag(tag, attrs, end=end) -# if tag == "item": -# self.item = string -# elif self.item is None: -# self.parts.append(string) -# else: -# self.item += string -# -# def handle_endtag(self, tag): -# string = "".format(tag) -# if self.item is None: -# self.parts.append(string) -# elif tag == "item": -# if any(title in self.item for title in self.keep): -# string = self.item + string -# else: -# string = "" -# self.item = None -# self.parts.append(string) -# else: -# self.item += string -# -# def handle_startendtag(self, tag, attrs): -# self.handle_starttag(tag, attrs, end=True) -# -# def handle_data(self, data): -# if self.item is None: -# self.parts.append(data) -# else: -# self.item += data -# -# def handle_entityref(self, data): -# self.handle_data("&{};".format(data)) -# -# def handle_charref(self, data): -# self.handle_data("$#{};".format(data)) - -#parser = FeedParser(sys.argv) -#parser.feed(sys.stdin.read()) -#parser.close() - -#print(''.join(parser.parts), end='') - -# The easy way. Works. -def check(block): - if '' not in block: return True - if any(title in block for title in sys.argv): return True - return False - -print(''.join(filter(check, sys.stdin.read().split(''))), end='') diff --git a/local/bin/twpcalc.sh b/local/bin/twpcalc.sh deleted file mode 100755 index 513fb47..0000000 --- a/local/bin/twpcalc.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# Reading input {{{ - -# Terminal -read -p "Alias: " alias_ -read -s -p "Secret: " secret - -echo -n "$secret$alias_" | shasum | sed 's/../\\\\x&/g' | xargs echo -e | base64 | colrm 17 - diff --git a/local/bin/upload.sh b/local/bin/upload.sh deleted file mode 100755 index 3b4f68c..0000000 --- a/local/bin/upload.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# Thanks to noctua for the base script -# Thanks to Iasoon for the advanced ssh config parsing -set -e - -sshhost="Flesje" -fles="http://t2-wan.be" - -# Find ssh username -user=$( - # Join config entries - sed -n '$!{/host /I!{H;d}};x;s/\n/ /g;p' $HOME/.ssh/config | - # Extract user/host combinations - grep -i 'user' | tr -s ' ' ' ' | - sed 's/^.*host \([^ \t]\+\).*user \([^ \t]\+\).*$/\1 \2/I' | - # Find user - (grep "^$sshhost" || echo $USER) | cut -d ' ' -f 2 ) - -file="$1" -chmod 644 $file -scp -p $file $sshhost:~/images/ -url="$fles/~$user/$file" -echo "$url" -echo "$url" | xclip