Skip to content

Instantly share code, notes, and snippets.

View khakionion's full-sized avatar

Michael Herring khakionion

View GitHub Profile
@khakionion
khakionion / keybase.md
Created September 9, 2019 23:05
keybase verification

Keybase proof

I hereby claim:

  • I am khakionion on github.
  • I am khakionion (https://keybase.io/khakionion) on keybase.
  • I have a public key ASAuCwOLckgxQKMRQH5eG2T_YGmu6erTIkk57GCayBu-cgo

To claim this, I am signing this object:

@khakionion
khakionion / dump_silgen_decls.swift
Last active May 24, 2017 22:40
Finds all void returning methods that take one Object, generates SIL forward declarations
//Use the output of this script like so:
//💻 ⤴️ ⤵️ 🌊 swiftli $ /swift/build/Ninja-DebugAssert/swift-macosx-x86_64/bin/swiftc -emit-cil -module-name="swiftli" ./SILGenOutput.swift BananaStatement.swift
import Foundation
func confirmUsage() -> Bool
{
if(CommandLine.arguments.count != 3)
{
print("Usage: dump_silgen_methods <path_to_monodis> <path_to_dotnet_dll>")
@khakionion
khakionion / player.cs
Last active February 1, 2016 09:17 — forked from sylistine/player.cs
void Update ()
{
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
{
HandleTouch();
}
}
void HandleTouch()
{
@khakionion
khakionion / KallitheaDiffParser.m
Created January 19, 2016 04:11
Hacky parser to build a CSV from Kallithea diff output
#import "AppDelegate.h"
#define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
@interface AppDelegate () <NSXMLParserDelegate>
@property (weak) IBOutlet NSWindow *window;
@property (atomic) BOOL insideFile;
@property (strong) NSString *currentFile;
@end
@khakionion
khakionion / battstat.swift
Created September 14, 2015 04:00
Access battery info (current, remaining charge, cycle count etc) in Swift
//
// main.swift
// battstat
//
// Created by Michael Herring on 2015/09/14.
// Copyright (c) 2015年 Michael Herring. All rights reserved.
//
import Foundation
import IOKit.ps
@khakionion
khakionion / TwoClasses.cs
Created August 12, 2015 03:46
enable/disable from script
////////////////////////////////////////////
//This first class has the Open/Close functionality, put it on a Cube or something
////////////////////////////////////////////
using UnityEngine;
using System.Collections;
public class openclose : MonoBehaviour {
// Use this for initialization
void Start () {
{"app_name":"TheAppName","app_version":"1.0","bundleID":"com.sunseaskyfactory.TheAppName","adam_id":928809948,"os_version":"iPhone OS 8.1 (12B410)","slice_uuid”:”yyy”,”share_with_app_devs":false,"build_version":"51","is_first_party":false,"bug_type":"109","name":"TheAppName"}
Incident Identifier: 40404CA5-1A1A-4417-A461-13C919394525
CrashReporter Key: e4aaaa407264c5e777d1a0eb326b0cf84daf9fc8
Hardware Model: xxx
Process: TheAppName [296]
Path: /private/var/mobile/Containers/Bundle/Application/145A1719-31DC-47BE-A777-10E1D9776C94/TheAppName.app/TheAppName
Identifier: com.sunseaskyfactory.TheAppName
Version: 51 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]