This file contains 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/ruby | |
#read EDL for start times | |
class Event | |
attr_accessor :start | |
attr_accessor :finish | |
attr_accessor :clip_name | |
This file contains 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/env ruby | |
# | |
# Created by Jamie Hardt on 2007-01-13. | |
# Copyright (c) 2007. All rights reserved. | |
require 'find' | |
files = { } | |
raise ArgumentError unless (filesPath = ARGV[0] and destPath = ARGV[1]) |
This file contains 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
// | |
// Riff.h | |
// riff-objc | |
// | |
// Created by Jamie Hardt on 3/27/09. | |
// Copyright 2009 The Sound Department. All rights reserved. | |
// | |
#import <Cocoa/Cocoa.h> |
This file contains 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
// | |
// Riff.m | |
// riff-objc | |
// | |
// Created by Jamie Hardt on 3/27/09. | |
// Copyright 2009 The Sound Department. All rights reserved. | |
// | |
#import "Riff.h" |
This file contains 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/sh | |
for file ; do | |
# We take every file we're given and... | |
echo "FLAC'ing" $file | |
# ...let the user know we've started working on it... | |
EXT=`echo $file | ruby -e "puts STDIN.read.scan(/([^.]*)$/)"` | |
# find out wether its name ends in ".wav" or ".aif" | |
This file contains 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/sh | |
for file ; do | |
NEW_FILENAME=`echo "$file" | ruby -e "puts STDIN.read.scan(/(.*)\.flac$/)"` | |
flac -d --keep-foreign-metadata "$file" -o "$NEW_FILENAME" 2>/dev/null | |
if [ -e "$NEW_FILENAME" ] | |
then | |
echo Successfully "de-FLAC'd" $file | |
rm "$file" | |
else echo Failed to inflate $file as $NEW_FILENAME | |
fi |
This file contains 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
-(NSData *)dataFromResource:(OSType)ident | |
resID:(NSInteger)idnum | |
inFile:(NSString *)path { | |
FSRef feRef; | |
FSPathMakeRef((UInt8 *)[path fileSystemRepresentation], &feRef, NULL); | |
ResFileRefNum refFileNum = FSOpenResFile(&feRef, fsRdPerm); | |
UseResFile(refFileNum); | |
Handle resHandle = Get1Resource(ident, idnum); | |
long size = GetResourceSizeOnDisk(resHandle); | |
This file contains 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) 2010 Jamie Hardt, All Rights Reserved. */ | |
/* | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the | |
following disclaimer in the documentation and/or other materials provided with the distribution. | |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED | |
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A |
This file contains 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
static NSString *SQLNullValueString = [[NSString alloc] initWithString:@"NULL"]; | |
/* Prototypes */ | |
NSString *SQLWhereClauseForPredictate(NSPredicate *predicate); | |
NSString *SQLExpressionForNSExpression(NSExpression *expression); | |
/* Implementation */ |
This file contains 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
@interface NSData (SimpleChecksum) | |
-(NSUInteger)simpleChecksum; | |
@end | |
@implementation NSData (SimpleChecksum) | |
-(NSUInteger)simpleChecksum { | |
NSUInteger i, accumuator = 0; |
OlderNewer