Skip to content

Instantly share code, notes, and snippets.

View lukaskollmer's full-sized avatar
👻
procrastinating

Lukas Kollmer lukaskollmer

👻
procrastinating
View GitHub Profile
@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 / 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 / lua_map.c
Created February 7, 2017 21:54 — forked from randrews/lua_map.c
Example of embedding Lua in C
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
#include <stdlib.h>
int map_create(lua_State *lua);
int map_slice(lua_State *lua);
int main(int argc, char **argv){
lua_State *lua = lua_open();
@lukaskollmer
lukaskollmer / .gitignore
Created January 6, 2017 14:36 — forked from TooTallNate/.gitignore
low-level objc runtime apis
*
!*.m
!Makefile
@lukaskollmer
lukaskollmer / CheckAppleStock.py
Last active January 2, 2017 14:56 — forked from omarshahine/CheckAppleStock
Checks Apple inventory for availability of any Apple SKU. In this example, AirPods
# If you don't have the requests module, you can download by typing:
#
# sudo easy_install -U requests`
#
# into the terminal on macOS
#
# You can change the partnum below with any Apple SKU
#
import urllib
@lukaskollmer
lukaskollmer / nginxproxy.md
Created September 11, 2016 14:59 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers