Skip to content

Instantly share code, notes, and snippets.

@noah
noah / Monaco for Powerline.md
Created July 26, 2026 05:32 — forked from lujiacn/Monaco for Powerline.md
Powerline-patched Monaco for Windows and OSX

Powerline-patched Monaco for Windows and OSX

This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.

I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)

Usage

Add the following lines to your .vimrc/_vimrc:

@noah
noah / dovecot-maildir-compress.sh
Last active November 30, 2022 09:34 — forked from cs278/dovecot-maildir-compress.sh
Compresses email in maildir format with check for already-compressed files
#!/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
@noah
noah / mmw
Last active September 8, 2018 03:30
mmw: _inimalistic _arkdown _iki
#!/bin/sh
#
# mmw: _inimalistic _arkdown _iki
#
# dependencies:
# - grip (or another markdown compiler)
# - tree(1)
#
# installation:
# - cat mmw> ./git/hooks/post-commit
@noah
noah / clean-rtorrent.sh
Created June 13, 2017 03:50
Cron task to delete torrents from rtorrent after 48 hours of seeding.
#!/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)
@noah
noah / count-exif-tags.py
Created January 4, 2017 16:26
Count unique EXIF tags
def grouper(iterable, n, fillvalue=None):
args = [iter(iterable)] * n
return izip_longest(*args, fillvalue=fillvalue)
# read exif data and build a list of unique keys
media_files = []
for root, sub_folders, files in walk(app.config['MEDIA_ROOT']):
for f in files:
media_files.append(path.join(root, f))
@noah
noah / convert.rb
Created January 4, 2017 15:02
Convert HTML to markdown using pandoc
#!/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]
@noah
noah / 2pod.sh
Created May 2, 2016 17:00
# recursively convert all flac to mp3 and add to ipod
#!/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
easterEgg.BadWorder.list={
"4r5e":1,
"5h1t":1,
"5hit":1,
a55:1,
anal:1,
anus:1,
ar5e:1,
arrse:1,
arse:1,
@noah
noah / rmmail
Created August 18, 2014 14:38
delete remote imap folders (offlineimap)
% cat $(which rmmail)
#!/bin/bash
if [ $# -ne 1 ]; then
echo "usage: $(basename $0) foldername"
exit
fi
if [ -n "$1" ]; then
@noah
noah / syncbit.sh
Created July 23, 2014 15:39
repeatedly attempt to synchronize fitbit using galileo
#!/bin/sh
out=
while [ -z "$out" ]; do
echo "$(date) syncing..."
cmdout="$(galileo --upload --https-only -d --force 2>&1)"
#echo "cmdout: $cmdout"
out="$(echo $cmdout|grep 'Synchronisation sucessfull')" # sic
#echo "out: $out"