Skip to content

Instantly share code, notes, and snippets.

View despairblue's full-sized avatar

Danny Martini despairblue

View GitHub Profile
DEBUG1: logging to file (/home/despairblue/.synergy.log) enabled
DEBUG1: thread 0x00000002 entry
DEBUG: plugins dir: /home/despairblue/.synergy/plugins
DEBUG: loading plugin: libns.so
ERROR: failed to load plugin 'libns.so', error: libssl.so.10: cannot open shared object file: No such file or directory
DEBUG1: starting client
DEBUG: XOpenDisplay(":0")
DEBUG2: can't read property 604 on window 0x00600001
DEBUG2: can't read property 604 on window 0x00400001
DEBUG2: can't read property 604 on window 0x00e00062
set -x
# Maintainer: Sven-Hendrik Haase <[email protected]>
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Jelle van der Waa <jelle vdwaa nl>
# Contributor: Stéphane Gaudreault <[email protected]>
# Contributor: Dale Blount <[email protected]>
# Contributor: Michael Düll <[email protected]>
# I would just like to take a minute here and state that synergy is
#import <RCTBridgeModule.h>
@interface DoNothing : NSObject <RCTBridgeModule>
@end
@despairblue
despairblue / index.jsx
Last active September 10, 2015 16:17
one off actions
function onError (field) {
this.refs[field].focus()
}
<Button onPress={() => this.props.register(this.state, onError)}>
Or Register
</Button>
function register ({username, password, email}, cb) {
return (dispatch, getState) => {
@despairblue
despairblue / NavigationBarSample.js
Created October 28, 2015 22:45
ref not working for Navigator's navigationBar prop
/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
/**
* The examples provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
wrapped = noMoreThanNTimesPerSecond(fn, 1)
// Every dot is 100ms
// the bar represents a timeout reset
// `c` is a function invocation
// timeout is reset every second
timeout |..........|..........|.
wrapped |c.........|...c......|c wrappedCalls: 3
fn |c.........|...c......|c fnCalls: 3
-- Logs begin at Wed 2015-12-16 14:24:26 UTC, end at Wed 2015-12-16 14:46:10 UTC. --
Dec 16 14:25:31 node-1 systemd[1]: Starting etcd2...
Dec 16 14:25:35 node-1 etcd2[850]: recognized and used environment variable ETCD_ADVERTISE_CLIENT_URLS=http://100.116.170.148:2379,http://100.116.170.148:4001
Dec 16 14:25:35 node-1 etcd2[850]: recognized and used environment variable ETCD_DATA_DIR=/var/lib/etcd2
Dec 16 14:25:35 node-1 etcd2[850]: recognized and used environment variable ETCD_DISCOVERY=https://discovery.etcd.io/da1771f77b2012d80c1e19ca2c763fe3
Dec 16 14:25:35 node-1 etcd2[850]: recognized and used environment variable ETCD_ELECTION_TIMEOUT=1200
Dec 16 14:25:35 node-1 etcd2[850]: recognized and used environment variable ETCD_INITIAL_ADVERTISE_PEER_URLS=http://100.116.170.148:2380
Dec 16 14:25:35 node-1 etcd2[850]: recognized and used environment variable ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379,http://0.0.0.0:4001
Dec 16 14:25:35 node-1 etcd2[850]: recognized and used environment variable ETCD_LISTEN_PEER
'use strict';
const map = new Map([[1,2], ['a', 'b']]);
for (const item of map.keys()) {
console.log(item);
}
import {getUser} from 'DB'
const getUserPromise = Promise.promisify(getUser)
const goify = fun =>
() =>
fun()
.then(val => [undefined, val])
.catch(error => [error])