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
#import <Foundation/Foundation.h> | |
#import <CoreServices/CoreServices.h> | |
int main(int argc, char **argv) { | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
if (argc <= 1) { | |
printf("Usage: %s searchstring\n", argv[0]); | |
[pool release]; | |
return 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
import socket,urllib2 | |
from xml.dom import minidom | |
# Get Info # | |
LocalIp = ([ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][0]) | |
def get_downloadlist(): | |
urlStr = 'http://' + LocalIp + ':10025/get/downloads/currentlist' | |
try: | |
fileHandle = urllib2.urlopen(urlStr) |
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
/************************************************************* | |
Copyright 2005-2007 Hacker Factor, All Rights Reserved. | |
By Neal Krawetz, www.hackerfactor.com | |
jpegquality: | |
Estimate the quality of the JPEG based on the quanitization tables. | |
Neal's personal comment... | |
"Jpeg, and Exif in particular, is one of the most screwed up formats | |
that I have ever seen." |
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
/* Copyright (c) 2007 Peter O'Gorman <[email protected]> | |
* | |
* Permission is hereby granted, free of charge, to any person | |
* obtaining a copy of this software and associated documentation | |
* files (the "Software"), to deal in the Software without | |
* restriction, including without limitation the rights to use, copy, | |
* modify, merge, publish, distribute, sublicense, and/or sell copies | |
* of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
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
/* | |
Opposite of the easy way: | |
http://aladino.dmi.unict.it/?a=unlocker | |
iTunes Unlocker - Copyright (C) 2009 Costantino Pistagna - [email protected] | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by |
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
on open names | |
set volumeName to names as text | |
set macAddress to (do shell script "ifconfig en0 | grep ether | tr -d '\\011' | sed s/ether// | sed 's/ //g' | sed s/://g") | |
set hostName to (do shell script "hostname -fs") | |
tell application "Finder" | |
set theSize to round (((capacity of startup disk) / 1024 / 1024) / 1024) | |
end tell | |
do shell script "defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1" with administrator privileges | |
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
// | |
// flashscreen.m | |
// Command Utility | |
// | |
// Copyright Cucurbita. All rights reserved. | |
// | |
// gcc -framework AppKit flashscreen.m -o flashscreen | |
// gcc -DHAVE_WINDOW_FADE -framework AppKit flashscreen.m -o flashscreen |
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
#import <CoreFoundation/CoreFoundation.h> | |
#import <stdlib.h> | |
void PermutationsOfWord (CFMutableArrayRef output, CFStringRef prefix, CFStringRef letters); | |
CFStringRef CFStringCreateWithContentsOfFile (const char *path); | |
int main (int argc, const char *argv[]) { | |
if (argc != 3) { | |
printf("Usage: scrabblegen dictionary.txt setofletters\n"); | |
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
#import <Foundation/Foundation.h> | |
#include <IOKit/IOKitLib.h> | |
#include <IOKit/network/IOEthernetInterface.h> | |
#include <IOKit/network/IOEthernetController.h> | |
static NSDictionary* GetMACAddresses( io_iterator_t netIterator ); | |
static kern_return_t FindNetworkInterfaces( io_iterator_t *services ); | |
static NSString* bytesToHexString( NSData* data ); |
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
// Contact: [email protected] | |
#include <CoreServices/CoreServices.h> | |
#include <Carbon/Carbon.h> | |
#include <QuickTime/QuickTime.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#define ec(ERR, STR) if((ERR) != noErr) fprintf(stderr, "## %s() error:%d\n", (STR), (ERR)) |