This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import sys | |
import urllib | |
# Change this to match your mail server's REVERSE static IP address | |
staticIPAddress = "1.0.0.127" | |
# Change this to an email address you don't mind sending to and from for the notice alert delivery |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation NSUserDefaults (RSFoundation) | |
+ (BOOL) rsImportPreferencesFromBundleID:(NSString*)otherBundleID ifNewerThanBundleID:(NSString*)ourBundleID | |
{ | |
BOOL didMigrate = NO; | |
NSArray* libraryFolders = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); | |
if ([libraryFolders count] > 0) | |
{ | |
NSString* prefsFolder = [[libraryFolders objectAtIndex:0] stringByAppendingPathComponent:@"Preferences"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Audio Hijack Pro" | |
set myAudio to (first session whose name is "Core Intuition MOTU 828") | |
set skypeAudio to (first session whose name is "Skype") | |
-- Start recording my mic input | |
start hijacking myAudio | |
start recording myAudio | |
-- Start recording Skype audio | |
start hijacking skypeAudio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fixpng () | |
{ | |
if [[ ! -f $1 ]] ; then | |
echo "Usage: fixpng <inputFiles> [outputFile]" | |
return -1 | |
else | |
local inputFile=$1 | |
local outputFile=$1 | |
if [[ -e $2 ]] ; then | |
outputFile=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
set frontProcess to first process whose frontmost is true | |
-- When it's down to just Finder and the front process, we have to switch | |
-- to the Finder first to get the front process to hide itself. Furthermore, | |
-- the Finder will not be listed as among the visible processes unless it | |
-- has open windows, so treat a condition of 2 *or fewer* visible apps as | |
-- meaning the Finder should be activated before hiding the front process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# run from terminal and you can watch it log as well... or nohup it | |
cd ~ | |
testSiteForChanges () | |
{ | |
ls "old_page.html" 1>/dev/null 2>/dev/null | |
if [ $? -eq "1" ] ; then | |
/usr/local/bin/wget -q -O old_page.html $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copies the selected tweet's URL from Twitter.app, and | |
# opens corresponding page for Aaron Swartz's Twitter Viewer. | |
# | |
# Original by John Gruber: https://gist.github.com/1440914 | |
# This version by Daniel Jalkut | |
# | |
# I'm hooking this up to a keyboard shortcut specifically in Twitter.app, | |
# using my scripting utility FastScripts. | |
# | |
# Requires "Access for Assistive Devices" to be enabled. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TextView.m | |
// TextDidChange | |
// | |
// Created by Timothy J. Wood on 10/27/09. | |
// Copyright 2009 The Omni Group. All rights reserved. | |
// | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (id)copyWithZone:(NSZone *)zone | |
{ | |
RSRadialProgressCell* newbie = [super copyWithZone:zone]; | |
// When you use -[super copyWithZone], you have to assume that the superclass may have copied your instance variables over verbatim. So | |
// let's clear them out manually (using accessors would cause the stale pointer reference to be released). | |
newbie->mProgressView = nil; | |
newbie->mProgressView = [mProgressView retain]; | |
newbie->mProgressCompletedOverlayImage = nil; | |
newbie->mProgressCompletedOverlayImage = [mProgressCompletedOverlayImage retain]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation JimPopUpButtonCell | |
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView | |
{ | |
NSRect rect = [self drawingRectForBounds: cellFrame]; | |
rect.size.width -= 17; // chop off the popup indicator | |
NSSize imageSize = NSMakeSize(12, 12); | |
rect.origin.x += (rect.size.width - imageSize.width) / 2.0; |