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 Foundation | |
guard CommandLine.arguments.count > 2 else { | |
print("Usage: \(CommandLine.arguments[0]) data.rom outputFolder") | |
exit(EXIT_FAILURE) | |
} | |
let outputPath = CommandLine.arguments[2] | |
func fileInfo(path: String) -> (exists: Bool, isDirectory: Bool) { | |
var isDir: ObjCBool = false |
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
function modifyCommit -d "Creates a new commit by modifying an old one" | |
argparse --name=modifyCommit "p/parent=+" "c/content=" "C-preserve-committer" "S/gpg-sign=" -- $argv; or return | |
if test (count $argv) != 1 | |
echo "Usage: modifyCommit [-p parent] [--preserve-committer] [--content content] commitHash" | |
echo "Got " $argv | |
return 1 | |
end | |
set commit $argv[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
import Foundation | |
extension String { | |
func leftpad(to size: Int, with char: Character) -> String { | |
if count >= size { return self } | |
return String(repeating: char, count: size - count) + self | |
} | |
} | |
guard CommandLine.arguments.count > 2 else { |
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 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 sys | |
import os | |
import re | |
from PIL import Image | |
from PIL import ImageOps | |
from unitypack.asset import Asset | |
if len(sys.argv) < 4: | |
print("Usage: " + sys.argv[0] + " assetfile.assets inputFolder outputFile.emip\nInput folder should contain files whose names start with the object ID they want to replace.") | |
exit() |
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 sys | |
import os | |
import json | |
import unitypack | |
from unitypack.asset import Asset | |
if len(sys.argv) < 4: | |
print("Usage: " + sys.argv[0] + " assetfile.assets edits.json outputfolder\nEdits.json should be an array of objects with the fields 'CurrentEnglish', 'CurrentJapanese', 'NewEnglish', and 'NewJapanese'. An optional 'Discriminator' field can be added if multiple texts have the same English and Japanese values."); | |
exit() |
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 sys | |
import unitypack | |
from unitypack.asset import Asset | |
if len(sys.argv) < 3: | |
print("Usage: " + sys.argv[0] + " assetfile.assets (offset | offsetfile.txt)\nOffset file formatting: per line \"offset [printout name]\"") | |
exit() | |
try: | |
targetOffsets = [[int(sys.argv[2], 0), sys.argv[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
// Note: This is just a copy of the swift stdlib Filter.swift with everything renamed | |
//===--- Filter.swift -----------------------------------------*- swift -*-===// | |
// | |
// This source file is part of the Swift.org open source project | |
// | |
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors | |
// Licensed under Apache License v2.0 with Runtime Library Exception | |
// | |
// See https://swift.org/LICENSE.txt for license information | |
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors |
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
From a301a28f43fc9faa20bd3d3e8452bf20dfe988d6 Mon Sep 17 00:00:00 2001 | |
From: Evan Tang <etang110@gmail.com> | |
Date: Thu, 7 Sep 2017 12:02:26 -0500 | |
Subject: [PATCH 1/4] Fixed an issue where the library would infinitely try to | |
reconnect NSNumber bools are convertible to Integers and NSNumber integers | |
that are 0 or 1 are convertible to booleans This caused the reconnect code to | |
improperly assume that a netsplit occurred because it received an int | |
payload, not a bool | |
--- |
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 | |
if len(sys.argv) < 2: | |
print("Usage: " + sys.argv[0] + " file.tatsu") | |
exit(1) | |
tatsuFileName = sys.argv[1] | |
try: | |
tatsuFile = open(tatsuFileName, "r") |