Skip to content

Instantly share code, notes, and snippets.

View ronkorving's full-sized avatar

Ron Korving ronkorving

View GitHub Profile
@ronkorving
ronkorving / tabbar.js
Created March 22, 2016 09:20
A proof-of-concept for a tab-system
(function () {
// <minui-tabs>
// <minui-tabbar>
// <minui-tab name="tab1" active>Tab 1</minui-tab>
// <minui-tab name="tab2">Tab 2</minui-tab>
// </minui-tabbar>
// <minui-tabspace>Hello world</minui-tabspace>
// <minui-tabspace>Goodbye cruel world</minui-tabspace>
// </minui-tabs>
@ronkorving
ronkorving / GetSystemLanguage.mm
Created January 28, 2015 07:20
Extracting iOS system language for Unity in Assets/Plugins/iOS/GetSystemLanguage.mm
#include "UnityAppController.h"
/*
* This Plug in will set a "systemLanguage" string key in PlayerPrefs with the system language code.
*/
@interface GetSystemLanguage : UnityAppController
@end
@implementation GetSystemLanguage
@ronkorving
ronkorving / ios6-timers.js
Last active March 9, 2022 03:40
iOS6 webkit timer bug workaround
(function (window) {
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6.
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling.
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction).
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise
// that it works, or that I will provide support (don't sue me).
// Author: [email protected]
var timeouts = {};
@ronkorving
ronkorving / nodejs-cluster-http-proxy.js
Created September 29, 2011 07:45
Combining cluster and node-http-proxy for part master and part worker http responses
var cluster = require('cluster'),
http = require('http'),
httpProxy = require('http-proxy');
var httpPort = 4332;
var clusterSock = './cluster.sock';
var httpServer = http.createServer(function (req, res) {
res.end('Worker! ' + process.pid);