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
// Playground - noun: a place where people can play | |
import UIKit | |
/* | |
Variables | |
*/ | |
// | |
//var x : Int = 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
#!/bin/sh | |
# resizeIcons.sh | |
# Creates new sizes from a source PNG in the iOS icon sizes | |
# [email protected] | |
# Depends: sips (OS X scriptable image processing) | |
function resize { | |
currentImage=$1 | |
newImage=$2 |
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
on replace_string(input, search, replacement) | |
set oldDelim to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to search | |
set textItems to every text item of input | |
set AppleScript's text item delimiters to replacement | |
set res to textItems as string | |
set AppleScript's text item delimiters to oldDelim | |
return res | |
end replace_string |
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/bash | |
# Takes a repository and script from the command line | |
# and executes the script for each git log entry in reverse chronological order | |
# Use temporary files of the following format | |
TMP_TEMPLATE="/tmp/gitreplay-XXXXXXXX" | |
# Validate command line parameters | |
if [ -z $1 -o -z $2 ]; then |
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
tell application "iTunes" | |
set d to (current date) - (12 * weeks) | |
repeat with t in (every track where played date is less than d and video kind is TV show) | |
set unplayed of t to true | |
end repeat | |
end tell |
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
# Replace "search" with "replacement" in "input" (all text) | |
on replace_string(input, search, replacement) | |
set oldDelim to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to search | |
set textItems to every text item of input | |
set AppleScript's text item delimiters to replacement | |
set res to textItems as string | |
set AppleScript's text item delimiters to oldDelim | |
return res |