clean up and take out the garbage

This commit is contained in:
Felix Van der Jeugt 2018-07-02 16:46:49 +02:00
parent f167902156
commit 7366303850
No known key found for this signature in database
GPG Key ID: 58B209295023754D
13 changed files with 0 additions and 249 deletions

31
local/bin/.gitignore vendored
View File

@ -1,6 +1,5 @@
# Some actual binary files # Some actual binary files
automat-visualize
cabal cabal
ctags ctags
dmenu dmenu
@ -10,10 +9,8 @@ dvtm*
dwm dwm
gloss-juicy-viewer gloss-juicy-viewer
hlint hlint
html2text
jshon jshon
notmuch notmuch
pygmentize
rbenv rbenv
readtags readtags
sent sent
@ -30,31 +27,3 @@ wjt
# shouldn't share this one with the world # shouldn't share this one with the world
macaddress 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

View File

@ -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

View File

@ -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

View File

@ -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())

Binary file not shown.

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -1,4 +0,0 @@
#!/bin/bash
mpv $HOME/.local/bin/plop.mp3

View File

@ -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())

View File

@ -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 '</item>' not in block: return True
if any(title in block for title in sys.argv): return True
return False
print('<item>'.join(filter(check, sys.stdin.read().split('<item>'))), end='')

View File

@ -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

View File

@ -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