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 mcworldlib as mc | |
import deepdiff | |
import re | |
from sys import argv | |
#argv = [None, 'world/region/r.0.0.original.mca', 'world/region/r.0.0.mca'] | |
name1 = argv[1] | |
name2 = argv[2] | |
file1 = mc.anvil.load_region(name1) |
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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<meta charset='utf-8'> | |
<meta http-equiv='x-ua-compatible' content='ie=edge'> | |
<meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'> | |
<title>Cheers!</title> | |
<style type='text/css'> | |
.ingredient { |
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 re | |
A_LINE_PATTERN = re.compile(r"^([0-9A-F]+) \$(A[0-9A-F]{3})$") | |
HEX_PATTERN = re.compile(r"^[0-9A-F]+$") | |
BRANCH_PATTERN = re.compile(r'^(?P<address>[0-9A-F]+) (?P<instruction>B(?:RA|CC|CS|EQ|GE|GT|HI|LE|LS|LT|MI|NE|PL|VC|VS)) (?P<dest>[0-9A-F]+)$') | |
def read_rom_procs(rom_disasm_path): | |
# read procedure names from FDisasm rom disassembly | |
procs = {} |
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
--- iOS 10.3 | |
+++ iOS 11 | |
+BUG_COMPATIBLE_20160819 | |
-COMPILER=clang-8.1.0 | |
+COMPILER=clang-9.0.0 | |
+DEFAULT_CACHE_SIZE=128 | |
+DEFAULT_CKPTFULLFSYNC | |
+DEFAULT_JOURNAL_SIZE_LIMIT=32768 | |
+DEFAULT_PAGE_SIZE=4096 | |
+DEFAULT_SYNCHRONOUS=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
// cc reenumerate.c -framework IOKit -framework CoreFoundation -o reenumerate | |
#include <stdio.h> | |
#include <CoreFoundation/CoreFoundation.h> | |
#include <IOKit/IOKitLib.h> | |
#include <IOKit/IOCFPlugIn.h> | |
#include <IOKit/usb/IOUSBLib.h> | |
#include <mach/mach.h> | |
#define kExcAccMaxWait 5 |
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
/* | |
EUMShowTouchDropIn | |
single-file drop-in version | |
Copyright (c) 2014 Shawn Xiao <[email protected]> | |
Copyright (c) 2016 Jesús A. Álvarez <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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 | |
# iconv line by line with fallback encoding | |
require 'optparse' | |
options = { | |
from: Encoding::UTF_8, | |
to: Encoding::UTF_8, | |
fallback: Encoding::ISO_8859_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
let points = [ | |
((-1, 0), (0,0), (13,25)), | |
((13, 22), (13, 24), (13, 23)), | |
((23, 12), (13, 17), (17, 12)), | |
((31, 16), (26, 12), (29, 14)), | |
((54, 0), (34, 7), (43, 0)), | |
((78, 24), (67, 0), (78, 11)), | |
((78, 27), (78, 25), (78, 26)), | |
((79, 27), (78, 27), (78, 27)), | |
((94, 42), (87, 27), (94, 33)), |
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 | |
# wait until knock launches | |
while [ -z "`ps cax | grep Knock`" ]; do | |
sleep 3 | |
done | |
# wait a bit more | |
sleep 3 | |
# disable security agent support | |
lldb <<EOF | |
attach Knock |
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
infix operator --> { associativity left precedence 80 } | |
func --><T:IntegerType>(inout left:T, right:T) -> Bool { | |
if left != right { | |
left = left.advancedBy(left > right ? -1 : 1) | |
return true | |
} else { | |
return false | |
} | |
} |
NewerOlder