Skip to content

Instantly share code, notes, and snippets.

#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
// I am printing a short hint about using croppic
void printUsage (void) {
NSArray *croppicArgs = [[NSArray alloc] initWithObjects:@"-w [width]",
@"-h [height]",
@"-x [x coordinate]",
@"-y [coordinate]",
@"-i [input image file path]",
//
// created 07.30.2009 by Hank McShane
// version: 0.1
// requires: Mac OS X 10.5 or higher
// Thanks to Craig Williams for his code suggestion which can be seen here:
// http://macscripter.net/viewtopic.php?id=29902
// Usage:
// ChangeFileDates -cDate creationDate -mDate modificationDate -file filePath
#import <Foundation/Foundation.h>
void printUsage () {
printf("Usage: asxpath -file [XML file path] -xpath [XPath expression]\n");
}
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
// getting the arguments passed on the command line
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
@atr000
atr000 / absearch.m
Created February 8, 2010 05:07
absearch.m
#import <Foundation/Foundation.h>
#import <AddressBook/AddressBook.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
NSString *phoneSearchString = [userDefaults stringForKey:@"phone"];
if (!phoneSearchString) {
// A tiny program that converts PDF documents to high resolution PNG images.
//
// gcc --std=c99 -Wall -g -o pdf2png pdf2png.m -framework Cocoa
//
// Written by Evan Jones <[email protected]> Februrary, 2004
// http://www.eng.uwaterloo.ca/~ejones/
//
// Released under the "do whatever you want" public domain licence.
#include <Cocoa/Cocoa.h>
//
// hfsfind - find files and folders on HFS+ mounted volumes on Mac OS X
//
// findfile.m
//
// Created by John Chang on 2007-06-18.
// This code is Creative Commons Public Domain. You may use it for any purpose whatsoever.
// http://creativecommons.org/licenses/publicdomain/
//
// For the original source code by John Chang please see:
#import <Foundation/Foundation.h>
#import <CoreServices/CoreServices.h>
#import <unistd.h>
#import <sys/stat.h>
#import <time.h>
#define manager [NSFileManager defaultManager]
char *returnString=NULL;
char *returnSize(long theSize)
/*
*
* bigfiles -- list big files in given directories
*
* License: The MIT License, http://www.opensource.org/licenses/mit-license.php
* Copyright (c) 2009 jv
*
* compile with: gcc -std=c99 -Wall -Wextra -pedantic -O3 -o bigfiles bigfiles.c
*
* For how to implement recursive directory scanning please see:
/*
* A word wrapper
* Copyright (C) 2009
* Andreas Harnack (ah8 at freenet dot de)
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
/*
* A character filter with Unicode support
* Copyright (C) 2009
* Andreas Harnack (ah8 at freenet dot de)
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.