Skip to content

Instantly share code, notes, and snippets.

@mickn
mickn / YouTube-PiP
Created August 24, 2017 14:53
YouTube Picture-in-Picture for iOS
javascript:document.querySelector(%22video%22).webkitSetPresentationMode(%22picture-in-picture%22);
@mickn
mickn / split.py
Created October 30, 2016 08:43
Split PDF with spreads into separate pages
#!/usr/bin/env python
import copy, sys
from pyPdf import PdfFileWriter, PdfFileReader
input = PdfFileReader(sys.stdin)
output = PdfFileWriter()
for p in [input.getPage(i) for i in range(0,input.getNumPages())]:
q = copy.copy(p)
(w, h) = p.mediaBox.upperRight
p.mediaBox.upperRight = (w/2, h)
q.mediaBox.upperLeft = (w/2, h)
@mickn
mickn / .muttrc
Created September 10, 2016 18:58
My Mutt Configuration (Gmail, Multiple Accounts, Not-Mutch Search, OfflineImap)
# Paths {{{
set folder = ~/Mail # mailbox location
set alias_file = ~/.mutt/alias # where to store aliases
set header_cache = ~/.mutt/cache/headers # where to store headers
set message_cachedir = ~/.mutt/cache/bodies # where to store bodies
set certificate_file = ~/.mutt/cerficates # where to store certs
set mailcap_path = ~/.mutt/mailcap # entries for filetypes
set tmpdir = ~/.mutt/temp # where to keep temp files
set signature = ~/.mutt/sig # my signature file