Skip to content

Instantly share code, notes, and snippets.

@rborn
rborn / sns_update_apns_cert.sh
Created September 22, 2017 13:20 — forked from knu/sns_update_apns_cert.sh
Update an APNS certificate on SNS using aws CLI
arn=arn:aws:sns:...
p12=/path/to.p12
aws sns set-platform-application-attributes --platform-application-arn "$arn" --attributes PlatformCredential="\"$(openssl pkcs12 -in "$p12" -nodes -nocerts)\"",PlatformPrincipal="\"$(openssl pkcs12 -in "$p12" -nodes -nokeys)\""
@rborn
rborn / sns_update_apns_cert.sh
Created September 22, 2017 13:20 — forked from knu/sns_update_apns_cert.sh
Update an APNS certificate on SNS using aws CLI
arn=arn:aws:sns:...
p12=/path/to.p12
aws sns set-platform-application-attributes --platform-application-arn "$arn" --attributes PlatformCredential="\"$(openssl pkcs12 -in "$p12" -nodes -nocerts)\"",PlatformPrincipal="\"$(openssl pkcs12 -in "$p12" -nodes -nokeys)\""
@rborn
rborn / static_server.js
Created May 26, 2017 15:40 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@rborn
rborn / README.md
Created January 26, 2017 15:16 — forked from bomberstudios/README.md
Loading a Cocoa Framework in a Sketch Plugin

This is what Craft does:

function loadFramework(pluginRoot) {
  if (NSClassFromString('PanelsManager') == null) {
    var mocha = [Mocha sharedRuntime];
    return [mocha loadFrameworkWithName:'Panels' inDirectory:pluginRoot];
  } else {
    return true;
 }
@rborn
rborn / bugs.js
Created December 7, 2016 11:35 — forked from creationix/bugs.js
var neopixelWrite = require('ESP8266').neopixelWrite;
var count = 120;
var pixels = new Uint8Array(count * 3);
function update() {
neopixelWrite(14, pixels);
}
function dampen(p) {
var i = (p % count) * 3;
pixels[i]>>>=1;
pixels[++i]>>>=1;
@rborn
rborn / LICENSE
Last active October 15, 2016 12:01 — forked from commonsguy/LICENSE
de aar: Convert Android AAR Artifacts Into Library Projects
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
@rborn
rborn / patched socket.io.js
Created January 22, 2016 09:23 — forked from ndob/patched socket.io.js
Socket io 1.2.0 patched to work with tiws (https://github.com/omorandi/tiws)
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.io=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
module.exports = _dereq_('./lib/');
},{"./lib/":2}],2:[function(_dereq_,module,exports){
/**
* Module dependencies.
*/
@rborn
rborn / app.js
Created January 15, 2016 18:08 — forked from benbahrenburg/app.js
Titanium Settings Dialog Examples
Ti.UI.setBackgroundColor('#000');
var alertSettings = require("settings-dialog");
var win = Ti.UI.createWindow({
title:'Example', backgroundColor:'#fff', layout:"vertical"
});
win.add(Ti.UI.createLabel({
text:"Example on now to prompt user to change settings",
@rborn
rborn / ios.settings.schemes.md
Created January 15, 2016 13:21 — forked from tzmartin/ios.settings.schemes.md
iOS Settings URL Scheme List

Settings URL schemes:

Note: < i=OS 5.1 use prefs:. > 5.1 use app-settings:

  • app-settings:root=General&path=About
  • app-settings:root=General&path=ACCESSIBILITY
  • app-settings:root=AIRPLANE_MODE
  • app-settings:root=General&path=AUTOLOCK
  • app-settings:root=General&path=USAGE/CELLULAR_USAGE
  • app-settings:root=Brightness
@rborn
rborn / gist:08772e82b3098cf67290
Created January 5, 2016 13:52 — forked from stephenfeather/gist:2ac42b8544c995f7b7ff
OSX command line for tool to test your android library for text relocations
/sdks/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-readelf -a yourlib.so | grep TEXTREL