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/python | |
import sys | |
import os | |
from collections import defaultdict | |
import hashlib | |
theRoot = '/Volumes/Stuff/Files/' | |
theTrashFolder = '/Volumes/Stuff/Trash/' |
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 python3 -tt | |
""" | |
Module documentation. | |
""" | |
# Imports | |
import sys | |
#import os | |
# Global variables |
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
#import <Availability.h> | |
#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_4_3 | |
#warning "This library uses ARC which is only available in iOS SDK 4.3 and later." | |
#endif | |
#if !defined dct_weak && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_5_0 | |
#define dct_weak weak | |
#define __dct_weak __weak | |
#define dct_nil(x) |
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
- (NSString *)uuidString { | |
// Returns a UUID | |
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); | |
NSString *uuidStr = (__bridge_transfer NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid); | |
CFRelease(uuid); | |
return uuidStr; | |
} |
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+Base64.h | |
// base64 | |
// | |
// Created by Matt Gallagher on 2009/06/03. | |
// Copyright 2009 Matt Gallagher. All rights reserved. | |
// | |
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. Permission is granted to anyone to |
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
// | |
// NSURL+ADNFileHelpers.h | |
// | |
// Created by Abizer Nasir on 02/08/2011. | |
// | |
// Public Domain because I love you | |
#import <Foundation/Foundation.h> | |
@interface NSURL (ADNFileHelpers) |
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 sh | |
# Tidy up whitespace on commit. | |
# By-pass it with the --no-verify option to git commit | |
if git-rev-parse --verify HEAD >/dev/null 2>&1 ; then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
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
// | |
// NSDate+RandomDate.h | |
// | |
// | |
#import <Foundation/Foundation.h> | |
@interface NSDate (RandomDate) | |
- (NSDate *)randomDateInYearOfDate; |
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
module Main where | |
{- | |
- Problem Statement: | |
- http://code.google.com/codejam/contest/351101/dashboard#s=p1 | |
- | |
- Usage either compile or use runhaskell / runghc | |
- Pass the input file as the sole command line argument | |
- Redirect output if you want the results to go in a file | |
-} |
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
// | |
// FakeNotificationCentre.h | |
// | |
// After Graham Lee | |
// | |
// Ghetto mock for unit testing. | |
#import <Foundation/Foundation.h> | |