Skip to content

Instantly share code, notes, and snippets.

View abock's full-sized avatar

Aaron Bockover abock

View GitHub Profile
@abock
abock / ios-repl-swizzle.cs
Created November 30, 2016 21:55
Sample code for integration in a Xamarin Studio addin to implement swizzling of System.Reflection.Emit enabled core assemblies ("REPL-enabeled") for Xamarin.iOS. Refer to https://bugzilla.xamarin.com/show_bug.cgi?id=48239 and https://github.com/praeclarum/Continuous/issues/46 for more context.
// ios-repl-swizzle.cs
//
// Copyright 2016 Microsoft.
//
// 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
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
aaron@porkbelly maccore/maccore 👉 mono --version (git)-[master]-
Mono JIT compiler version 4.2.2 (explicit/996df3c Wed Jan 20 00:19:48 EST 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.6.0svn-mono-(detached/a173357)
@abock
abock / -
Created September 25, 2015 16:12
aaron@porkbelly monodevelop/main 👉 DYLD_LIBRARY_PATH=POTATO PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin ./autogen.sh (git)-[cycle6]-
>>>>> main/autogen.sh: SOME_ARBITRARY_VAR=
>>>>> main/autogen.sh: PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin:/usr/bin:/bin:/usr/sbin:/sbin
>>>>> main/autogen.sh: DYLD_LIBRARY_PATH=
@abock
abock / -
Created April 22, 2015 18:04
2015-04-22 14:04:35.746 PatriotChatiOS[8194:3783547] Unhandled managed exception:
Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. The system cannot find the file specified. (System.IO.FileNotFoundException)
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef, System.Security.Policy.Evidence assemblySecurity) [0x00081] in /Users/builder/data/lanes/1503/c2c00129/source/mono/mcs/class/corlib/System/AppDomain.cs:706
at System.AppDomain.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in /Users/builder/data/lanes/1503/c2c00129/source/mono/mcs/class/corlib/System/AppDomain.cs:674
at System.Reflection.Assembly.Load (System.Reflection.AssemblyName assemblyRef) [0x00000] in /Users/builder/data/lanes/1503/c2c00129/source/mono/mcs/class/corlib/System.Reflection/Assembly.cs:551
at ObjCRuntime.Runtime.CollectReferencedAssemblies (System.Collections.Generic.List`1 assemblies, System.Reflection.Assembly assembly) [0x00019] in /Users/builder/data/lanes/1503
#!/usr/bin/env bash
#
# alias make=path/to/this/script
#
# if you don't want Makefiles to touch your
# git submodules. Insane.
#
nogitdir="/tmp/nogitsubmodulesfrommake"
mkdir -p "$nogitdir"
#!/usr/bin/env bash
#
# alias make=path/to/this/script
#
# if you don't want Makefiles to touch your
# git submodules. Insane.
#
nogitdir="/tmp/nogitsubmodulesfrommake"
mkdir -p "$nogitdir"
#!/usr/bin/env bash
nogitdir="/tmp/nogitsubmodulesfrommake"
mkdir -p "$nogitdir"
git="$(which git)"
{ cat <<EOF
#!/usr/bin/env bash
if [ "\$1" = "submodule" ]; then
echo "*** INSANITY: someone is messing with git submodules in a Makefile"
echo "*** not running this command:"
// Mountain Lion (10.8) - this is 'int' (32 bits always)
typedef enum {
SCNGeometryPrimitiveTypeTriangles = 0,
SCNGeometryPrimitiveTypeTriangleStrip = 1,
SCNGeometryPrimitiveTypeLine = 2,
SCNGeometryPrimitiveTypePoint = 3
} SCNGeometryPrimitiveType;
// Mavericks (10.9) - this is 'long' (32 or 64 bits depending on architecture)
typedef NS_ENUM(NSInteger, SCNGeometryPrimitiveType) {
PUBLIC2
PUBLIC