Skip to content

Instantly share code, notes, and snippets.

View oroce's full-sized avatar

Róbert Oroszi oroce

  • Budapest, Hungary
View GitHub Profile
@oroce
oroce / app.js
Created August 1, 2011 06:26 — forked from kwhinnery/app.js
Faking Long Touch on Android in Titanium Mobile
//The table view row just has to have a full height view in order
//to trigger the TableView touchstart
function LongTouchTableViewRow(_title) {
var row = Ti.UI.createTableViewRow({
height:50
});
var v = Ti.UI.createView({
height:50
});
@oroce
oroce / app.js
Last active August 29, 2015 14:01 — forked from gergelyke/app.js
app.use(function *responseTime(next){
var start = new Date;
yield next;
var ms = new Date - start;
this.set('X-Response-Time', ms + 'ms');
});
app.use(function *logger(next){
var start = new Date;
yield next;
@oroce
oroce / app.js
Last active August 29, 2015 14:14 — forked from gergelyke/app.js
function sendAlert (property, value) {
console.log('Sending alert... %s : %s', property, value);
var payload = {
apiKey: '',
message: ''
};
var options = {
host: 'api.opsgenie.com',
player
.use(seekBar)
.use(volumeControl);
player
.use(function(next) {
if (hasAccess) {
return watchLaterControl(next);
}
@oroce
oroce / gist:eeddcf623ff90dd8fbf8d9e21214b73c
Created July 16, 2016 21:03 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
(function (window, document, script, raven, el, first, loaded) {
raven = [];
window.onerror = function e(message, file, line, colno, ex) {
if (loaded) {
return;
}
raven.push([message, file, colno, ex]);
};
el = document.createElement(script);
first = document.getElementsByTagName(script)[0];