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 | |
# Erase freespace from the command line: diskutil secureErase freespace [level] [device] | |
if [ "$#" -lt 1 ]; then | |
echo "$0: too few arguments" | |
echo "Usage: $0 path/to/disk" >&2 # echo error to stderr | |
exit 1 | |
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
import objc, os | |
from Foundation import * | |
from AppKit import * | |
ACScriptSuperMenuTitle = None | |
ACScriptMenuTitle = "Compress with TinyPNG" | |
ACShortcutKey = 'i' | |
ACShortcutMask = "command control" | |
ACIsAction = True |
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
var s_ajaxListener = new Object(); | |
s_ajaxListener.tempOpen = XMLHttpRequest.prototype.open; | |
s_ajaxListener.tempSend = XMLHttpRequest.prototype.send; | |
s_ajaxListener.callback = function () { | |
window.location='mpAjaxHandler://' + this.url; | |
}; | |
XMLHttpRequest.prototype.open = function(a,b) { | |
if (!a) var a=''; | |
if (!b) var b=''; |
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 | |
# | |
# git-branch-delete | |
# | |
# Deletes a branch both locally and remotely in the origin. | |
# | |
############################################################################### | |
# 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
/* | |
* erasefreespace.m | |
* Description: Parse a string for the percentage of freespace erased | |
* Author: Chad Armstrong | |
* Date: 3 October 2017 | |
* To compile: gcc -framework Foundation erasefreespace.m -o erasefreespace | |
*/ | |
#import <Foundation/Foundation.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
git branch | grep defects | awk '{original=$1; sub("defects","old-defects"); print original, $1}' | xargs -n 2 git branch -m |
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
/* | |
* checkFilePermissions.m | |
* Description: A collection of methods which checks if a given file can be deleted | |
* and checks other permissions and properties. | |
* Author: Chad Armstrong | |
* Date: 1 December 2017 | |
* To compile: gcc -w -framework Foundation -framework AppKit checkFilePermissions.m -o checkFilePermissions | |
*/ | |
#import <Foundation/Foundation.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
/* | |
* export_words_tok.m | |
* | |
* Description: Reverse engineer the WORDS.TOK file from an AGI Sierra game. | |
* The results are saved into two files: words.txt and words.json | |
* Author: Chad Armstrong (chad@edenwaith.com) | |
* Date: 25-28 June 2018 | |
* To compile: gcc -w -framework Foundation export_words_tok.m -o export_words | |
* | |
* Resources: |
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 | |
# TSS = Take Simulator Screenshot | |
# Script workaround for the crash in Xcode 8 Simulator crashing when | |
# trying to save a screenshot in El Capitan | |
# Version: 1.2 (3 February 2017) - Add screenshot to clipboard | |
# Version: 1.1 (31 January 2017) - Play screenshot file | |
# Version: 1.0 (Early January 2017) - Initial version | |
# Change to the Desktop, take the screenshot, then move back to the original directory |
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
#include <LiquidCrystal.h> | |
// LiquidCrystal display with: | |
// rs on pin 12 | |
// rw on pin 11 | |
// enable on pin 10 | |
// d4-7 on pins 5 - 2 | |
// LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); | |
// LiquidCrystal lcd(12, 11, 5, 4, 3, 2); |