Skip to content

Instantly share code, notes, and snippets.

Ian Chesal ianchesal

Block or report user

Report or block ianchesal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ianchesal /
Created Sep 1, 2012
Figures out the total size of all the sub-directories under a directory
#!/bin/env python
__doc__ = '''
Figure out the size of everything contained in all the sub-directories under a target
in some sort of parallel manner. Try and produce some output that's not as terrible
to grok as du.
ianchesal /
Created Sep 1, 2012
Open File Descriptors per Process
#!/usr/bin/env perl
# Works on any system that supports a 'ps aux' call and the lsof
# command. Counts the number of open file descriptors for each
# process in the 'ps aux' output. Handy if you're trying to see
# which process is hanging on to the most FDs.
use strict;
printf("%-10s %-10s %s\n", 'PID', 'OPEN FDS', 'COMMAND');
ianchesal / gist:3187966
Created Jul 27, 2012
Error trying to unloaded kext for track pd
View gist:3187966
MacBook-Pro:~ ian$ sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTrackpad.kext
(kernel) Can't unload kext; classes have instances:
(kernel) Kext class AppleUSBFnTrackpad has 1 instance.
(kernel) Kext class AppleUSBGrIITrackpad has 1 instance.
(kernel) Kext class AppleUSBGrIIITrackpad has 1 instance.
(kernel) Kext class AppleUSBTrackpad has 1 instance.
Failed to unload - (libkern/kext) kext is in use or retained (cannot unload).
ianchesal / gist:2998601
Created Jun 26, 2012
AskDifferent Question #54791
View gist:2998601
> dig any
; <<>> DiG 9.7.3-P3 <<>> any
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27993
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
ianchesal / gist:2288184
Created Apr 3, 2012
Calculate Winners for the Apple.SE iPad Contest
View gist:2288184
import json
import subprocess
from pprint import pprint
import time
import sys
import operator
# The Level 3 Crowd
ianchesal /
Created Jul 8, 2011 — forked from compbrain/
Download wallpaper images
__doc__ = """
A quick script that fetches desktop images from the site.
It will start at the most current list of images and keep moving backwards, downloading
desktop images in to a directory on your local machine, until it finds an image that
already exists on disk. At that point it will stop.
You can’t perform that action at this time.