Skip to content

Instantly share code, notes, and snippets.

View stefanschmidt's full-sized avatar

Stefan stefanschmidt

  • Hamburg, Germany
View GitHub Profile
@stefanschmidt
stefanschmidt / delete-macfusion-filesystems.sh
Last active December 21, 2015 23:19
Delete all Macfusion filesystems
rm ~/Library/Application\ Support/Macfusion/Filesystems/*
pkill macfusionAgent
@stefanschmidt
stefanschmidt / move-microsoft-user-data.sh
Last active December 24, 2015 07:19
Prevent Microsoft Office from creating ~/Documents/Microsoft User Data on OS X
mv "$HOME/Documents/Microsoft User Data" "$HOME/Library/Preferences"
@stefanschmidt
stefanschmidt / rubycocoa.rb
Last active December 24, 2015 07:39
Homebrew formula for RubyCocoa
require 'formula'
class Rubycocoa <Formula
url 'http://downloads.sourceforge.net/project/rubycocoa/RubyCocoa/1.0.5/RubyCocoa-1.0.5.tar.gz'
homepage 'http://rubycocoa.sourceforge.net/'
sha1 '7e176eebb4ee59e2b45f03de0b9ae38028876236'
depends_on 'libxml2'
def keg_only?
@stefanschmidt
stefanschmidt / gnur_gui.rb
Last active December 24, 2015 18:19 — forked from woahdae/r_app.rb
Homebrew formula for GNU R GUI
require 'formula'
class RApp < Formula
ARCHS = "x86_64"
SYSTEM = "SnowLeopard64"
url 'http://cran.r-project.org/bin/macosx/Mac-GUI-1.62.tar.gz'
homepage 'http://cran.r-project.org/bin/macosx/'
sha1 '3f7ef605076cf537b304a05d979ae44d3cb054ab'
keg_only "This is a gui app (and a brew antipattern as such, but whatev)"
@stefanschmidt
stefanschmidt / copy-public-key-to-kindle.sh
Last active December 27, 2015 12:39
Copy SSH Public Key to Kindle for password-less Login (tested on 5th Generation)
scp ~/.ssh/id_rsa.pub root@kindle:/mnt/us/usbnet/etc/authorized_keys
@stefanschmidt
stefanschmidt / pdfreflow.rb
Created December 3, 2013 02:25
Homebrew formula for pdfreflow
require 'formula'
class Pdfreflow < Formula
homepage 'http://sourceforge.net/projects/pdfreflow/'
url 'http://downloads.sourceforge.net/project/pdfreflow/pdfreflow-0.8.6.tgz'
sha1 '9adfb2378db3a206b0b0d0374802628328894889'
env :std
def install
@stefanschmidt
stefanschmidt / sandbox-safari.sh
Created December 3, 2013 22:26
Open Safari with Sandbox debugging output
sandbox-exec -p "(version 1) (allow default) (deny file-write*) (debug all)" /Applications/Safari.app/Contents/MacOS/Safari
@stefanschmidt
stefanschmidt / extract-pdf-images.sh
Last active December 30, 2015 07:29
Extract images from obfuscated (aka "encrypted") PDFs on OS X
brew install qpdf xpdf
qpdf --decrypt original.pdf free.pdf
pdfimages -j free.pdf arbitrary_image_prefix
@stefanschmidt
stefanschmidt / refresh-kindle-index.sh
Created December 9, 2013 14:58
Refresh Kindle index
# from http://www.mobileread.com/forums/showpost.php?p=1181285&postcount=8
dbus-send --system /default com.lab126.powerd.resuming int32:1
@stefanschmidt
stefanschmidt / get-presentation2go.sh
Last active April 10, 2017 09:47
Download silverlight video streams from a presentation2go server on OS X
#!/bin/bash
# 1. Install wireshark and mimms (e.g. via Homebrew)
# 2. Start this script
# 3. Play a presentations2go video in a browser
# 4. Wait for the download to finish (can take a while)
# Alternatively you can also try to disable the Silverlight plugin and then HTML5 videos might be displayed
# To enforce display of HTML5 videos it might help to set your browser's user agent to iPad