Skip to content

Instantly share code, notes, and snippets.

View wtsnz's full-sized avatar
🛠️
Working

Will Townsend wtsnz

🛠️
Working
View GitHub Profile
@wtsnz
wtsnz / cube.dae
Created October 25, 2018 18:36
An example Collada file
<?xml version="1.0" encoding="UTF-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<authoring_tool>SceneKit Collada Exporter v1.0</authoring_tool>
</contributor>
<created>2018-10-25T16:29:03Z</created>
<modified>2018-10-25T16:29:03Z</modified>
<unit meter="1.000000"/>
<up_axis>Y_UP</up_axis>
@wtsnz
wtsnz / UIImage+InCurrentBundle.swift
Created May 8, 2017 01:17
Load a UIImage from an xcassets library in your framework.
extension UIImage {
convenience init?(inCurrentBundleNamed: String) {
class BundleClass { }
self.init(named: inCurrentBundleNamed, in: Bundle(for: BundleClass.self), compatibleWith: nil)
}
}
@wtsnz
wtsnz / OpenGLAudioVisualiserComponent.cpp
Created April 15, 2017 22:32
A hacky version of the JUCE AudioVisualiserComponent that renders the graph OpenGL
/*
==============================================================================
OpenGLAudioVisualiserComponent.cpp
Created: 15 Apr 2017 8:00:56pm
Author: Will Townsend
==============================================================================
*/
@wtsnz
wtsnz / index.js
Created February 18, 2017 00:57
Fabric to Pushover: New Users
var Pushover = require('node-pushover');
var moment = require('moment');
var request = require('request');
// Fill out with your secrets
var secrets = {
pushover: {
token: '',
user: ''
},
@wtsnz
wtsnz / delazy.js
Last active August 2, 2016 22:17
Super hacky script to delazy your swift files to decrease compile time.
//
// Hacky script to convert lazy loaded closures into private instance functions
// The script ignores Pods, Carthage and build folders, and only looks for
// .swift files
// This doesn't work on all cases, and may break things. Be warned ⚠️
//
// Usage:
// node delazy.js <folder path>
//
# Delete any existing NSAppTransportSecurity configurations
/usr/libexec/PlistBuddy -c "Delete :NSAppTransportSecurity" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
# Add the NSAppTransportSecurity dictionary again
/usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity dict" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity:NSExceptionDomains dict" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
# Add s3.amazonaws.com NSExceptionRequiresForwardSecrecy and set it to false
# This is a requirement of the Carnival.io SDK
/usr/libexec/PlistBuddy -c "Add :NSAppTransportSecurity:NSExceptionDomains:s3.amazonaws.com dict" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
@wtsnz
wtsnz / _service.md
Last active March 19, 2016 04:31 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@wtsnz
wtsnz / 0014-add-fembed-bitcode-flag.patch
Created September 28, 2015 20:10
Add -fembed-bitcode to MobileVLCKit
From 968ff57dd5830d9962d429e5757737274305e12f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?W=20T=20K=C3=BChne?= <[email protected]>
Date: Fri, 29 Sep 2015 18:34:26 +0200
Subject: [PATCH 13/13] add -fembed-bitcode
diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh
index f514732..4917973 100755
--- a/extras/package/ios/build.sh
+++ b/extras/package/ios/build.sh
@wtsnz
wtsnz / openssl-build.sh
Last active September 28, 2015 10:21 — forked from felix-schwarz/openssl-build.sh
Updated script that builds OpenSSL for OS X, iOS and tvOS. Bitcode enabled for iOS, tvOS. Updated to build for tvOS, use the latest SDKs, skip installing man pages (to save time), download the OpenSSL source over HTTPS, patch OpenSSL for tvOS to not use fork(). Currently requires Xcode7.1b or later (for the tvOS SDK).
#!/bin/bash
# This script downlaods and builds the iOS and Mac openSSL libraries with Bitcode enabled
# Credits:
# https://github.com/st3fan/ios-openssl
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh
# https://gist.github.com/foozmeat/5154962
# Peter Steinberger, PSPDFKit GmbH, @steipete.
# Felix Schwarz, IOSPIRIT GmbH, @felix_schwarz.
@wtsnz
wtsnz / buildMobileVLC.sh
Created September 27, 2015 12:57 — forked from fbradyirl/buildMobileVLC.sh
Modified to build tvOS framework. run with ./buildMobileVLCKit.sh -t -f
#!/bin/sh
# Copyright (C) Pierre d'Herbemont, 2010
# Copyright (C) Felix Paul Kühne, 2012-2015
set -e
BUILD_DEVICE=yes
BUILD_SIMULATOR=yes
BUILD_STATIC_FRAMEWORK=no
SDK=`xcrun --sdk iphoneos --show-sdk-version`