Skip to content

Instantly share code, notes, and snippets.

View jasonrm's full-sized avatar

Jason R. McNeil jasonrm

  • Arizona
  • 09:52 (UTC -07:00)
View GitHub Profile
#!/bin/sh
# Very, very basic... and stupid. But I reinstall my systems a lot so maybe this will make it less painful.
current_coreutils="http://ftp.gnu.org/gnu/coreutils/coreutils-7.4.tar.gz"
current_gnupg="ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.9.tar.gz"
current_wget="http://ftp.gnu.org/gnu/wget/wget-1.11.4.tar.gz"
# Make sure we have gcc...
gcc="`which gcc`"
if [ -f "$gcc" ]; then
@jasonrm
jasonrm / zfsEmptyTrash.sh
Created July 20, 2009 18:33
Empty ZFS trash on Mac OS X
#!/bin/sh
# If you use ZFS of Mac OS X 10.5 right now
# then you know that emptying the trash
# will not empty the trash on ZFS filesystems
# however we can do this with brute force.
list=`zfs list -o mountpoint -t filesystem | sed 1d`
for filesystem in $list
do
sudo rm -rf $filesystem/.Trashes/*
sudo rm -rf $filesystem/.Trash/*
@jasonrm
jasonrm / windows_caps-to-ctrl.reg
Created July 29, 2009 17:57
Windows, change caps lock key to Ctrl
Windows Registry Editor Version 5.00
; I never use Caps Lock, thus reassign the key to act as control.
; This assumes you are already using a default US keyboard layout
; so I have no idea how this would modify key mapping for other layouts.
[HKEY_CURRENT_USER\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@jasonrm
jasonrm / *scratch*
Created September 5, 2009 09:00
Take and manage ZFS snapshots on Mac OS X 10.5/10.6
#!/usr/bin/php
<?php
print("zfsSnapshot.php : Starting ZFS snapshots\n");
$howFarBackInTime_Hours = 8;
$howFrequentIsScriptCalled_Minutes = 10;
$keepThisMany = $howFarBackInTime_Hours * 60 / $howFrequentIsScriptCalled_Minutes;
print("zfsSnapshot.php : Keeping $keepThisMany snapshots\n");
@jasonrm
jasonrm / gist:265299
Created December 29, 2009 13:04
790 KNST (Tucson, AZ) Windows Media Stream
#!/bin/sh
curl -s http://knst.com/cc-common/streaming_new/index.html?refreshed=yes | grep genasx
@jasonrm
jasonrm / gist:265301
Created December 29, 2009 13:05
m0n0wall authors file for mapping svn->git
awhite = Andrew White <andywhite@gmail.com>
mkasper = Manuel Kasper <mk@neon1.net>
cbuechler = Chris Buechler<cbuechler@gmail.com>
jdegraeve = Jonathan de Graeve <Jonathan.De.Graeve@imelda.be>
sgiese = Shawn Giese <shawngiese@gmail.com>
mwiget = Marcel Wiget <mwiget@gmail.com>
michael.iedema = Michael Iedema <michael@askozia.com>
dinesh = Dinesh Nair <dinesh@alphaque.com>
ptaylor = Paul Taylor <PaulTaylor@winn-dixie.com>
@jasonrm
jasonrm / install_10a286.sh
Created December 30, 2009 06:13
Install Apple's 10a286 ZFS bits.
#ZFS binaries from 10a286. Works with Snow Leopard release (10a432). Note the new libzpool.dylib.
#Repeat after me:
tar -xzf zfs-10a286.tar.gz
cd zfs-10a286
sudo chown -R root:wheel *
sudo cp -pR libzfs.dylib libzpool.dylib /usr/lib/
sudo cp -pR zfs zpool /usr/sbin/
sudo cp -pR zfs.8 zpool.8 zfs.util.8 /usr/share/man/man8
sudo cp -pR zfs.kext /System/Library/Extensions/
sudo cp -pR zfs.fs /System/Library/Filesystems/
(kernel) kxld[com.apple.filesystems.zfs]: The following symbols are unresolved for this kext:
(kernel) kxld[com.apple.filesystems.zfs]: _gethrtime
(kernel) Can't load kext com.apple.filesystems.zfs - link failed.
(kernel) Failed to load executable for kext com.apple.filesystems.zfs.
(kernel) Kext com.apple.filesystems.zfs failed to load (0xdc008016).
(kernel) Failed to load kext com.apple.filesystems.zfs (error 0xdc008016).
Failed to load ./zfs.kext - (libkern/kext) link error.
Check library declarations for your kext with kextlibs(8).
#!/usr/bin/env ruby
# Source: http://gist.github.com/208825
# Xcode auto-versioning script for Subversion by Axel Andersson
# Updated for git by Marcus S. Zarra and Matt Long
# Converted to ruby by Abizer Nasir
# Appends the git sha to the version number set in Xcode.
# see http://www.stompy.org/2008/08/14/xcode-and-git-another-build-script/ for more details
Process: CrashyEmailApp [41281]
Path: /tmp/letters/build/Release/CrashyEmailApp.app/Contents/MacOS/CrashyEmailApp
Identifier: com.lettersapp.CrashyEmailApp
Version: 1.0d1 (30 95476d7)
Code Type: X86-64 (Native)
Parent Process: launchd [709]
Date/Time: 2010-01-24 20:20:08.167 -0700
OS Version: Mac OS X 10.6.2 (10C540)
Report Version: 6