Skip to content

Instantly share code, notes, and snippets.

@niklassaers
niklassaers / recipe-ios.sh
Created February 5, 2012 11:04
Compile protobuf 2.4.1 on iOS 5
export ARCH=arm-apple-darwin10
export ARCH_PREFIX=${ARCH}-
export PLATFORM=iPhoneOS
export SDKVER=5.0
export DEVROOT=/Developer/Platforms/${PLATFORM}.platform/Developer
export SDKROOT="$DEVROOT/SDKs/${PLATFORM}$SDKVER.sdk"
export PKG_CONFIG_PATH="$SDKROOT/usr/lib/pkgconfig:$DEVROOT/usr/lib/pkgconfig"
export AS="$DEVROOT/usr/bin/as"
export ASCPP="$DEVROOT/usr/bin/as"
@niklassaers
niklassaers / vapor-with-theo-getting-started.swift
Created July 18, 2020 19:29
Vapor with Theo - Getting started
import Vapor
import Theo
func theoClient(completion: @escaping (BoltClient) -> ()) {
do {
let client = try BoltClient(hostname: "127.0.0.1",
port: 7687,
username: "neo4j",
password: "test",
encrypted: true)
@niklassaers
niklassaers / gist:f18eabb67f3547573064
Created October 13, 2015 05:00
Make TODO and FIXME into Warnings
TAGS="TODO:|FIXME:|\/\/TODO"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"