Skip to content

Instantly share code, notes, and snippets.

View lukaskollmer's full-sized avatar
🧚‍♂️
frolicking

Lukas Kollmer lukaskollmer

🧚‍♂️
frolicking
View GitHub Profile
201 [ 675.362959] Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 8
202 [ 675.363355] Pid: 3457, comm: lve_tag_thread veid: 0 Not tainted 2.6.32-673.8.1.lve1.4.3.el6.x86_64 #1
203 [ 675.363748] Call Trace:
204 [ 675.363972] <NMI> [<ffffffff81546288>] ? panic+0xa7/0x16f
205 [ 675.364284] [<ffffffff81015039[> ? sched_clock+0x9/0x10
206 [ 675.364520] [<ffffffff81105fdd[> ? watchdog_overflow_callback+0xcd/0xd0
207 [ 675.364757] [<ffffffff8113ed17[> ? __perf_event_overflow+0xa7/0x240
208 [ 675.364993] [<ffffffff8101ee24[> ? x86_perf_event_set_period+0xf4/0x180
209 [ 675.365230] [<ffffffff8113f364[> ? perf_event_overflow+0x14/0x20
@lukaskollmer
lukaskollmer / UIDevice+serialNumber.h
Created April 24, 2017 13:48 — forked from 0xced/UIDevice+serialNumber.h
UIDevice+serialNumber
/*
* Adds the serialNumber property to the UIDevice class
*
* The implementation uses undocumented (for iOS) IOKit functions,
* so handle with caution and be prepared for nil.
*/
#import <UIKit/UIDevice.h>
@interface UIDevice (serialNumber)
@lukaskollmer
lukaskollmer / block.cc
Created May 16, 2017 18:26
Objective-C blocks in C++ (this actually works!)
int __block_invoke_1(struct __block_literal_1 *_block, ...) {
printf("hello world\n");
return 1;
}
struct __block_literal_1 {
void *isa;
int flags;
int reserved;
//int (*invoke)(struct __block_literal_1 *, ...);
@lukaskollmer
lukaskollmer / whitespace.txt
Last active September 17, 2017 11:55
SpringBoard unnamed folder
[⠀]
# Use the whitespace character between the brackets as an iOS folder name to get an "unnamed" folder
# A "regular" space won't work because iOS will detect that
[​]
# This is a regular zero width character (useful for other things like Twitter, etc)
from objc_util import *
@on_main_thread
def show_overlay():
UIDebuggingInformationOverlay = ObjCClass('UIDebuggingInformationOverlay')
UIDebuggingInformationOverlay.prepareDebuggingOverlay()
UIDebuggingInformationOverlay.overlay().toggleVisibility()
show_overlay()
tell application "iTunes"
set song repeat to one # one/all/off
end tell
tell application "iTunes" to play track "Skyfall"
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#pragma mark Function Pointers and Blocks
typedef void (*CDUnknownFunctionPointerType)(void); // return type and parameters are unknown
@lukaskollmer
lukaskollmer / main.m
Created June 6, 2017 13:56 — forked from stuartcarnie/main.m
Demonstrates we can now support limited JIT compilation on recent versions of iOS (assuming Apple approves entitlements at some future point)
//
// main.m
// ProtectTest
// Demonstrates newer versions of iOS now support PROT_EXEC pages, for just-in-time compilation.
//
// Must be compiled with Thumb disabled
//
// Created by Stuart Carnie on 3/4/11.
// Copyright 2011 Manomio LLC. All rights reserved.
//
@lukaskollmer
lukaskollmer / main.m
Created June 28, 2017 11:59 — forked from steventroughtonsmith/main.m
Load Mach-O executable at runtime and execute its entry point
void callEntryPointOfImage(char *path, int argc, char **argv)
{
void *handle;
int (*binary_main)(int binary_argc, char **binary_argv);
char *error;
int err = 0;
printf("Loading %s\n", path);
handle = dlopen (path, RTLD_LAZY);
@lukaskollmer
lukaskollmer / votes.csv
Created June 30, 2017 08:05
Searchable voting records of the German Bundestag on legalizing gay marriage http://www.bbc.com/news/world-europe-40441712
MP Party Yea Nay Abstain Invalid Didn't vote
Stephan Albani CDU/CSU 1 0 0 0 0
Katrin Albsteiger CDU/CSU 0 1 0 0 0
Peter Altmaier CDU/CSU 1 0 0 0 0
Artur Auernhammer CDU/CSU 0 1 0 0 0
Dorothee Bär CDU/CSU 0 1 0 0 0
Thomas Bareiß CDU/CSU 0 1 0 0 0
Norbert Barthle CDU/CSU 0 1 0 0 0
Günter Baumann CDU/CSU 0 1 0 0 0
Maik Beermann CDU/CSU 1 0 0 0 0