This file contains hidden or 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
--- Kirby Super Star: Boss Order Simulator | |
-- https://github.com/gocha/gocha-tas/blob/master/Tools/Lua/kirbysuperstar/random.lua | |
local SuperDeluxeRNG = require "kirbysuperstar/random" | |
function get_bosses(random) | |
-- Reimplementation of $d1e34f | |
local kNumOfBoss = 18 | |
local bosses = {} -- $7a2f-$7a53 | |
for i = 0, kNumOfBoss do |
This file contains hidden or 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
-- https://github.com/gocha/gocha-tas/blob/master/Tools/Lua/kirbysuperstar/random.lua | |
local SuperDeluxeRNG = require "kirbysuperstar/random" | |
local random = SuperDeluxeRNG.new(0x1234) | |
for i = 1, 10 do | |
print(random:random(6)) | |
-- raw random seed can be accessed via random.seed | |
end |
This file contains hidden or 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
// Kirby Super Star: RNG Simulator POC | |
#include <stdio.h> | |
#include <stdint.h> | |
static uint16_t seed = 0x7777; | |
uint8_t random(uint8_t limit) { | |
for (int i = 0; i < 11; i++) { | |
uint16_t bit = ~(seed ^ (seed >> 1) ^ (seed >> 15)) & 1; |
This file contains hidden or 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
-- Castlevania: Aria of Sorrow - Song Randomizer | |
-- Runs on VBA-RR v23 (DO NOT USE v24) | |
local serial = string.char(unpack(memory.readbyterange(0x80000ac, 4))) | |
local m4aSongNumStart | |
if (serial == "A2CJ") then | |
m4aSongNumStart = 0x80d7950 | |
elseif (serial == "A2CE") then | |
m4aSongNumStart = 0x80d9378 |
This file contains hidden or 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
/** | |
* Parses an XML document or element into a JavaScript Object. | |
* | |
* To turn the object into JSON, use JSON.stringify(). | |
* | |
* This function is heavily inspired by: | |
* - [Converting Between XML and JSON]{@link http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html} | |
* - [xmltodict]{@link https://github.com/martinblech/xmltodict} Python library. | |
* Thank you very much for both of two. | |
* |
This file contains hidden or 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
"""Print parsed SQL statement as a tree. | |
Uses Python 3 and sqlparse package. | |
""" | |
from typing import Iterator, Tuple | |
import argparse | |
import locale | |
import sys | |
import os |
This file contains hidden or 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
--- emviewers/scripts/loadswf.js.orig Thu Aug 16 11:26:42 2018 | |
+++ emviewers/scripts/loadswf.js Thu Aug 16 11:40:06 2018 | |
@@ -2,6 +2,13 @@ | |
// This array should be modified everytime a new viewer is supported or when a | |
// new version of a viewer is introduced. | |
// | |
+// requires: | |
+// swfobject 2.3 (swfobject.js and expressInstall.swf) <https://github.com/swfobject/swfobject> | |
+// patch for chrome 55 <https://github.com/swfobject/swfobject/pull/59> | |
+// and also do not forget to import swfobject.js instead of legacy flashver.js (modify your saved report html by hand) |
This file contains hidden or 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 | |
# | |
# Powershell-flavored command line argument parser example. | |
# | |
# Requires: ps_getopt.sh <https://gist.github.com/gocha/9b12fa0b7b5d18ae56e0452cec749e87> | |
# License: Unlicensed | |
. ps_getopt.sh | |
ALL_PARAMS=("Path" "Nullable" "Optional" "Force") |
This file contains hidden or 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 | |
# | |
# Powershell-flavored command line argument parser. | |
# | |
# See ps_getopt_sample.sh for usage. | |
# <https://gist.github.com/gocha/8c74f9724bfb9c1e3a98b28bd5cceddc> | |
# | |
# License: Unlicensed | |
declare -A params |
This file contains hidden or 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 | |
# | |
# Note: | |
# - Environment variables must be set before running. This script doesn't import any user profiles. | |
# Add Windows system directory paths to the PATH, | |
# to allow to use cmd.exe and any other standard commands. | |
export PATH="$(cygpath -S):$(cygpath -W):$PATH" | |
# Add some common system variables. |