Skip to content

Instantly share code, notes, and snippets.

@rolandwalker
rolandwalker / gitconfig
Created October 24, 2014 12:21
gitconfig PR aliases
[alias]
# change default of "upstream" if needed
pr = "!f() { \
local number=\"${1:-}\"; \
number=\"${number#\\#}\"; \
if test -z \"$number\" || test \"$#\" -gt 2; then \
echo 'syntax: git pr <integer> [<remote-to-fetch>]'; \
exit 1; \
else \
true; \
@rolandwalker
rolandwalker / cask_variants_draft.rb
Created August 2, 2014 12:26
proof-of-concept for Cask variants syntax
# Proposed syntax here is
#
# variant.localization('en') do
# version '1.0'
# end
#
# This syntax would be easier to implement, but cluttered
#
# variant :localization => 'en' do
# version '1.0'
@rolandwalker
rolandwalker / draft_xscreensaver.rb
Created June 18, 2014 18:37
draft xscreensaver Cask
class Xscreensaver < Cask
url 'http://www.jwz.org/xscreensaver/xscreensaver-5.29.dmg'
homepage 'http://www.jwz.org/xscreensaver/'
version '5.29'
sha256 '5821584b18dc400da5b74b58e27b39a5c9b36d12e87378bfbe4e40e569fbc78e'
link 'Screen Savers/XScreenSaverUpdater.app'
screen_saver 'Screen Savers/Abstractile.saver'
screen_saver 'Screen Savers/Anemone.saver'
screen_saver 'Screen Savers/Anemotaxis.saver'
screen_saver 'Screen Savers/AntInspect.saver'
@rolandwalker
rolandwalker / mosh_uninstall_repair.sh
Created January 29, 2014 23:48
mosh_uninstall_repair.sh
#!/bin/bash
### 12 items don't exist on a clean install of Mavericks, but
### should be available by installing XCode CLI tools here:
###
### http://adcdownload.apple.com/Developer_Tools/command_line_tools_os_x_mavericks_for_xcode__late_october_2013/command_line_tools_os_x_mavericks_for_xcode__late_october_2013.dmg
#
# /usr/bin/agvtool
# /usr/bin/clang++
# /usr/bin/g++
@rolandwalker
rolandwalker / Logitech_Harmony_uninstall.applescript
Created January 28, 2014 01:12
Uninstall Logitech Harmony Remote Software.app/Contents/Resources/Scripts/main.scpt
-- Uninstall Logitech Harmony Client Software - Version 0.3
-- Coded by: Ben De Silva
-- Date modified: 06/06/2008
property filesToDelete : {"/Applications/Logitech\\ Harmony\\ Remote\\ Software.app", "/Applications/remotecore.app", "/Library/Receipts/logitech.pkg", "/Library/Receipts/core.pkg", "/System/Library/Extensions/Belcarra.USBLAN_netpart.kext", "/System/Library/Extensions/Belcarra.USBLAN_usbpart.kext", "/System/Library/Extensions/RemoteControl.USBLAN_usbpart.kext", "/Library/Receipts/RemoteControlUsbKext.pkg", "/Library/Preferences/com.apple.java.util.prefs.plist", "/Library/Preferences/com.logitech.harmony.plist", "~/Library/Preferences/com.apple.java.util.prefs.plist", "~/Library/Preferences/com.logitech.harmony.plist", "~/Library/Preferences/com.logitech.harmony.cappuccino.client.logitech.plist", "~/Logitech", "~/Logitech/Prefs", "~/Logitech/Monitor", "~/Logitech/remote", "~/Logitech/usblan", "~/browser\\ -\\ logitech/", "~/Library/Application\\ Support/Logitech"}
property theApplication : "Logit
/bin/chmod -- u+x -funnyfile
/bin/launchctl load -- -funnyfile.plist
/bin/ln -s -- -funnyfile file
/bin/ls -l -- -funnyfile
/bin/mv -i -- file -funnyfile
/bin/rm -f -- -funnyfile
/bin/rmdir -p -- -funnyfile
/sbin/kextunload -q -- -funnykext
/usr/bin/ditto -v -- -funnyfile file

/usr/bin/file -b -- -funnyfile