Skip to content

Instantly share code, notes, and snippets.

Andrew atr000

  • Boston, MA
Block or report user

Report or block atr000

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
View i_ching.dat
Earth, mother, people, etc.,
Collapse, splitting apart,
atr000 /
Created Mar 14, 2011
Sets the FSTypeCode of the given file(s) to the specified code
#!/usr/bin/env python
"""A very simple script to set FSTYPE info field on a file.
Usage: ./ [-h] [-t '????'] [-T 1061109567] FILE [...]
Sets the FSTypeCode of the given file(s) to the specified code -
'OggS' by default.
(This script requires Mac-platform python modules.)
import sys
import DictionaryServices
def main():
word = " ".join(sys.argv[1:])
except IndexError:
errmsg = 'No term entered to look up in the dictionary'
wordrange = (0, len(word))
atr000 / gatherFinderWindows.scpt
Created Feb 10, 2011
View gatherFinderWindows.scpt
tell application "Finder"
-- get desktop dimensions (dw = desktop width; dh = desktop height)
set db to bounds of window of desktop
set {dw, dh} to {item 3 of db, item 4 of db}
end tell
tell application "System Events"
repeat with proc in application processes
tell proc
repeat with win in windows
View findProxy.c
* FindProxies.c
* --------------------------------------------------------------------------------------
* The contents of this file are subject to the NOKOS License Version 1.0a (the
* "License"); you may not use this file except in compliance with the License.
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
View sysprefs.m
// (c) 2002 Julien Jalon <>
// See license info at the end of this file.
#import <Foundation/Foundation.h>
#include <CoreFoundation/CoreFoundation.h>
#include <SystemConfiguration/SystemConfiguration.h>
#define PRINT(X) printf("%s\n", [[NSString stringWithFormat:@"%@", (X)] ISOLatin1EncodedCString])
View wol.c
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
int main( int argc, char **argv )
int i,x,sockfd,an=1;
long n;
char buffer[201];
char mac[102];
View machSandman.c
#include <IOKit/IOKitLib.h>
#include <IOKit/pwr_mgt/IOPMLib.h>
#include <IOKit/IOReturn.h>
#include <mach/mach_init.h> /* for bootstrap_port */
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
int main(int argc, char *argv[])
atr000 / whoami.c
Created Dec 18, 2010
nice util to aid shell/home scripts on finding the remote ip over a ssh connection
View whoami.c
* $Id: //websites/unixwiz/ $
* written by : Stephen J. Friedl
* Software Consultant
* Tustin, California USA
* ***********************************************************
atr000 / getCaminoURL.scpt
Created Dec 17, 2010
View getCaminoURL.scpt
-- GetCaminoURL.applescript
-- Created by Thomas Willson on 8/7/09.
-- Copyright 2009 __MyCompanyName__. All rights reserved.
tell application "System Events"
set isRunning to ((application processes whose (name is equal to "Camino")) count)
end tell
if isRunning is greater than 0 then
You can’t perform that action at this time.