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
# Sets the CFBundleShortVersionString of the Xcode project to the last git tag | |
# Sets the CFBundleVersion number to one of 3 options below | |
git=/usr/bin/git | |
fullVersion=`$git describe --dirty` | |
# Use the most recent git tag for the CFBundleShortVersionString | |
appVersion=`echo $fullVersion | cut -d '-' -f1 | sed 's/v//'` | |
# Use the most recent commit hash for CFBundleVersion |
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
# Assumes you are using the entire project and the project directory is your current working directory. | |
# Each option is on its own line for readability. | |
# This only generates an HTML docset and doesn't install it into Xcode. | |
appledoc | |
--project-name CopyandPaste-Inator | |
--project-company "Doofenshmirtz Evil Inc." | |
--company-id com.doofenshmirtevilinc | |
--create-html | |
--no-install-docset |
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
# Download and install mp4tags command line utility and add to path | |
# OPTIONAL: Find the video on iTunes and select Copy Link. From the end of the link extract the 9 number video ID. | |
# Tag each movie | |
mp4tags -I 123456789 -H 1 -i movie MOVIE_HD.m4v | |
mp4tags -I 123456789 -H 0 -i movie MOVIE_SD.m4v | |
# Drag into iTunes together and they should be listed as HD-SD |
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
// Node script to retrieve Libsyn stats and display on Panic's Status Board app & as HTML | |
// This is rough but functional | |
// | |
// Thanks to Marco Arment for doing the hard work | |
// Based on https://gist.github.com/marcoarment/5393014 | |
var sys = require('sys'); | |
var fs = require('fs'); | |
var exec = require('child_process').exec; |
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
// Get unbilled hours from Freshbooks and show them in Panic's Status Board | |
// This assumes A LOT and is built for my usage. YMMV. | |
var sys = require('sys'); | |
var fs = require('fs'); | |
var exec = require('child_process').exec; | |
var parseString = require('xml2js').parseString; | |
var projListChild, timeEntryListChild; |
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 | |
# viewing environment variables | |
echo "The value of the home variable is: " | |
echo $HOME | |
# issue a command | |
echo "The output of the pwd command is: " | |
pwd |
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 | |
# Original student zip files go here after processing | |
DONEDIR="_done" | |
# Make sure we have a file to process and directory to go to | |
if [ $# -ne 2 ]; then | |
echo "Requires 2 Arguments: INPUT_FILE MAIN_OUTPUT_DIR" | |
exit | |
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
#!/usr/bin/perl | |
use URI::Query; | |
use Data::Dumper; | |
print "Content-Type: text/html\n\n"; | |
print "You sent the server:\n\n"; | |
print "<br><hr><br><pre>"; |
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
# This works fine | |
for f in *.java; do i=$(echo $f | awk -F "_" '{print $5}'); mv "$f" $i; done | |
# Can also do this with awk's system command. Trying to work around spaces was quite the adventure here. | |
# https://unix.stackexchange.com/questions/148454/how-to-escape-spaces-etc-in-passed-variable-for-system-call-to-cp-in-awk | |
find . -name "*.java" -exec echo '{}' \; | awk -F "_" '{system("echo '\''" $0 "'\'' " $5)}' |