Skip to content

Instantly share code, notes, and snippets.

Michael Herring khakionion

Block or report user

Report or block khakionion

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@khakionion
khakionion / dump_silgen_decls.swift
Last active May 24, 2017
Finds all void returning methods that take one Object, generates SIL forward declarations
View dump_silgen_decls.swift
//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>")
View player.cs
void Update ()
{
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
{
HandleTouch();
}
}
void HandleTouch()
{
@khakionion
khakionion / KallitheaDiffParser.m
Created Jan 19, 2016
Hacky parser to build a CSV from Kallithea diff output
View KallitheaDiffParser.m
#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 Sep 14, 2015
Access battery info (current, remaining charge, cycle count etc) in Swift
View battstat.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 Aug 12, 2015
enable/disable from script
View TwoClasses.cs
////////////////////////////////////////////
//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 () {
View gist:4b16d113047317b06535
{"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]
You can’t perform that action at this time.