Skip to content

Instantly share code, notes, and snippets.

View tujlaky's full-sized avatar

Ujlaky Tibor tujlaky

  • Budapest
View GitHub Profile
@tujlaky
tujlaky / ssh_config
Created August 4, 2015 08:53
ssh reconnect speedup
Host *
ControlPersist 4h
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%r
@tujlaky
tujlaky / recursive.js
Created June 15, 2015 06:28
recursive promise with array
var Promise = require('bluebird');
var testRecursive = function(count) {
return new Promise(function(resolve, reject) {
if ( count > 0 ) {
return testRecursive(count-1)
.then(function(numbers) {
numbers.push(count);
resolve(numbers);
});
@tujlaky
tujlaky / recursive_promise.js
Created June 15, 2015 06:01
recursive promise
var Promise = require('bluebird');
var testRecursive = function(count) {
return new Promise(function(resolve, reject) {
if ( count > 0 ) {
console.log('asd');
return testRecursive(count-1).then(function(c) {
resolve(c);
});
} else {
<div id="content" class="wrapper">
<div id="page-1" class="slider-page slider-page-1">
</div>
<div id="page-2" class="slider-page slider-page-2">
</div>
<div id="page-3" class="slider-page slider-page-3">
</div>
</div>
@tujlaky
tujlaky / watch.js
Created April 28, 2015 13:31
watch
;(function() {
'use strict';
if (!Object.prototype.watch) {
Object.defineProperty(Object.prototype, 'watch', {
enumerable: false,
configurable: true,
writable: false,
value: function (prop, handler) {
var oldval = this[prop];
@tujlaky
tujlaky / XJvqwj.markdown
Last active August 29, 2015 14:19
XJvqwj
@tujlaky
tujlaky / osx.vmx
Created April 11, 2015 22:18
osx vmx
.encoding = "windows-1250"
config.version = "8"
virtualHW.version = "10"
numvcpus = "2"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
sata0.present = "TRUE"
memsize = "5044"
sata0:0.present = "TRUE"
sata0:0.fileName = "OS X 10.9.vmdk"
@tujlaky
tujlaky / index.js
Created April 9, 2015 06:50
phonegap iOS push
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@tujlaky
tujlaky / index.js
Created April 7, 2015 07:42
Android push notification js for cordova
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0