Skip to content

Instantly share code, notes, and snippets.

View theraphim's full-sized avatar

Paul Komkoff theraphim

View GitHub Profile
WIZARDRY 8 HEX-EDIT
By Zyvr (zyvrmaccom)
Steps:
1.Open your save file (/save/*.sav) with a hex-editor.
2.Locate the nick-name of your character.
3.The order of characters' attributes in the .sav is L1-R1-L2-R2-L3-R3.
Each charater takes 1866 bytes.
4.See below for the positions for the attributes. Take the byte which
represents the first letter of the nick name as relative byte 0000.
@theraphim
theraphim / keybase.md
Created January 9, 2015 17:21
keybase.md

Keybase proof

I hereby claim:

  • I am theraphim on github.
  • I am stingray (https://keybase.io/stingray) on keybase.
  • I have a public key whose fingerprint is 4359 1B09 C525 23FC 584C C921 C8C5 BC9D A4B4 ECA4

To claim this, I am signing this object:

@theraphim
theraphim / test2.scala
Created October 2, 2015 18:14
I have no idea what this is.
object A {
def main(args: Array[String]) { println(b(Nil)) }
def b(list: List[Int]):List[List[Int]] = list match {
case full if full.size == 8 => List(full)
case _ => def valid(t:List[Int])(h:Int) = {
def diagonal(op: (Int,Int)=>Int, n:Int, li:List[Int]): Boolean = li match {
case Nil => false
case h :: t => n == h || diagonal(op, op(n,1), t)
}
@theraphim
theraphim / test1.scala
Created October 2, 2015 18:15
I have no idea what this is.
val n: Stream[Int] = Stream.cons(2, Stream.from(3,2) filter(x => n.takeWhile(p => p*p <= x) forall(x % _ != 0)))
n takeWhile(_ < 1000) foreach println
from math import sqrt, pow
def dist(a, b):
return sqrt(pow(a[0] - b[0], 2) + pow(a[1] - b[1], 2));
qspace = [((544, 532), (036, 633)),
((530, 528), (775, 890)),
((520, 540), (584, 621)),
((488, 538), (973, 315)),
((476, 496), (616, 412)),
yntax = "proto3";
package org.stingray.fmoney;
message Timestamp {
uint64 timestamp = 1;
uint64 confidence = 2;
}
message TypedAmount {
gcd(X, Y, G) :- X = Y, G = X, !.
gcd(X, Y, G) :-
X < Y,
Y1 is Y mod X,
(Y1 = 0 -> G = X; gcd(X, Y1, G)), !.
gcd(X, Y, G) :- X > Y, gcd(Y, X, G), !.
fib(0, 0).
fib(1, 1).
fib(N, NF) :-
A is N - 1, B is N - 2,
fib(A, AF), fib(B, BF),
NF is AF + BF.
fib(0, A, _, A).
fib(N, A, B, F) :- N1 is N - 1, Sum is A + B, fib(N1, B, Sum, F), !.
fib(N, F) :- fib(N, 0, 1, F), !.
{-#LANGUAGE ScopedTypeVariables#-}
import Text.Read
import System.IO
prompt :: String -> IO String
prompt text = do
putStr text
hFlush stdout
getLine