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 | |
# Enable zlib in Dovecot alongside automatic writing of new emails in gzipped format | |
## Convert Existing Emails using process described with the pseudocode here: https://wiki.dovecot.org/Plugins/Zlib | |
## | |
## | |
store=. | |
compress=bzip2 |
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/sh | |
# | |
# mmw: _inimalistic _arkdown _iki | |
# | |
# dependencies: | |
# - grip (or another markdown compiler) | |
# - tree(1) | |
# | |
# installation: | |
# - cat mmw> ./git/hooks/post-commit |
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/sh | |
# Close torrents in rtorrent after x hours of seeding | |
# dependencies: libxmlrpc-core-c3-dev, bc, nginx | |
# https://github.com/mdevaev/emonoda/wiki/rTorrent-XMLRPC-Reference | |
# http://elektito.com/2016/02/10/rtorrent-xmlrpc/ | |
x=48 | |
SERVER=localhost:8000 | |
now=$(date +%s) |
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
# ツ sudo lsusb|grep -i easy | |
# Bus 001 Device 007: ID 1b71:3002 Fushicai USBTV007 Video Grabber [EasyCAP] | |
# usbtv module on archlinux | |
# fushicai usbtv007 | |
# ultimately, mencoder works. also tried mplayer and ffmpeg but on-the-fly transcoding doesn't work. mplayer can't save tv "streams", so mencoder is necessary. | |
# audio transcode o-t-f is fast enough but just copy video and transcode it later | |
# tradeoff: 1GB/1minute of video, roughly |
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/env ruby | |
# | |
%w[nokogiri open-uri chronic].each{|lib| require lib} | |
base = "https://blog.tilton.co" | |
doc = Nokogiri::HTML open "#{base}/archive.html" | |
doc.search('section.archives a').each do |post| | |
post_link = post[:href] |
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/sh | |
KEYDIR=~/.ssh/keys.d/github-deploy | |
CONFDIR=~/.ssh/config.d/github-deploy | |
github_username=noah | |
github_access_token=$(cat ~/.secret/github_access_token) | |
rp=$(git rev-parse --is-inside-work-tree 2>/dev/null) |
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/env python2 | |
import sys | |
import smtplib | |
from subprocess import call | |
from email.parser import Parser | |
from email.utils import parseaddr, make_msgid | |
from email.mime.text import MIMEText | |
from email.mime.multipart import MIMEMultipart |
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/sh | |
# recursively convert all flac to mp3 | |
# | |
for dir in "$@"; do | |
echo "+ $dir" | |
find "$dir" -type f -name "*.flac"\ | |
| parallel -u\ | |
ffmpeg -v warning -n -i {} -qscale:a 0 {.}.mp3 | |
done |
NewerOlder