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
local vector = {} | |
vector.__index = vector | |
local function is_vector(t) | |
return getmetatable(t) == vector | |
end | |
function vector.new(x, y) | |
return setmetatable({ x = x or 0, y = y or 0 }, vector) | |
end |
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
setenv_x86_mac() | |
{ | |
export CFLAGS="-arch x86_64 -no-cpp-precomp" | |
} | |
setenv_arm_mac() | |
{ | |
export CFLAGS="-arch arm64 -no-cpp-precomp" | |
} |
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
# Booklet of counter of sheets | |
booklet_sheet_count = 3 | |
booklet_package_page_count = booklet_sheet_count * 2 * 2 | |
pages = sys.argv[1:] | |
if len(pages) % booklet_package_page_count != 0: | |
sys.stderr.write("Page count of PDF needs to be a multiple of " + str(booklet_run_count) + ".\n") | |
sys.stderr.write("You can append blank pages using Preview if needed. Select the last page and choose 'Edit > Insert > Blank Page'.\n") | |
sys.exit(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
#!/usr/bin/python | |
import getopt | |
import os, sys | |
path = False | |
# | |
# usage | |
# | |
def usage(): |
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
# Calculate the md5 of the word "grape" (without quotes) | |
echo -n grape | md5 |
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
// PLIST in NSData to NSDictionary | |
NSDictionary * result = [NSPropertyListSerialization propertyListWithData:data options:0 format:&format error:outError]; |
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 | |
# This script needs to have specific folders set. See the code below. | |
if [[ -z "$2" ]]; then | |
echo >&2 "MakeReleaseDMG creates a release disk image ready to be uploaded to the server." | |
echo >&2 "Remember to turn on Support for Assistive Devices in Universal Control" | |
echo >&2 "MakeReleaseDMG <Xcode archive path> <output dmg path>" | |
exit 1 | |
fi |