Skip to content

Instantly share code, notes, and snippets.

View oroce's full-sized avatar

Róbert Oroszi oroce

  • Budapest, Hungary
View GitHub Profile
const MenuRenderer = React.createClass({
contextTypes: {
router: React.PropTypes.func.isRequired
}
componentWillReceiveProps(newProps, oldProps) {
const router = this.context.router;
console.log('new props', newProps, oldProps);
// decide based on newProps or router
}
(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];
@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
@oroce
oroce / esnextbin.md
Last active April 30, 2016 20:50
esnextbin sketch
@oroce
oroce / readme.md
Created April 13, 2016 08:34
Wordpress setup script for scaleway VC1 server

Scaleway introduced VC1 (x64) servers but their images are built for arm :(

The setup.sh is basically commands copied from Dockerfile which is used to build the image: https://github.com/scaleway-community/scaleway-wordpress

Until they introduce image building possibilities this is your best shot:(

  1. Create a new server
  2. SSH and run the command above
  3. Shutdown the server
  4. Create a snapshot
@oroce
oroce / esnextbin.md
Last active February 17, 2016 09:20
esnextbin sketch
@oroce
oroce / index.js
Created February 16, 2016 12:34
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
const React = require('react');
const ReactDOM = require('react-dom');
const createStore = require('redux').createStore;
const extend = require('deep-extend');
const rootEl = document.getElementById('root');
const store = createStore(function(state, action) {
@oroce
oroce / index.js
Created February 15, 2016 20:49
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
const React = require('react');
const ReactDOM = require('react-dom');
const createStore = require('redux').createStore;
const extend = require('deep-extend');
const rootEl = document.getElementById('root');
const store = createStore(function(state, action) {
@oroce
oroce / index.js
Last active December 11, 2015 08:44
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var jade = require('jade');
var jstranformer = require('jstransformer');
var cdata = require('jstransformer-cdata');
var slug = require('http-slug');
var parseCSV = require('tiny-csv');
var csv = document.querySelector('#csv');
var tmpl = document.querySelector('#template');
var output = document.querySelector('#output');
Sat, 31 Oct 2015 14:19:46 GMT hci setting filter to: 1400000020c10000000000400000
Sat, 31 Oct 2015 14:19:46 GMT hci set event mask - writing: 01010c08fffffbff07f8bf3d
Sat, 31 Oct 2015 14:19:46 GMT hci set le event mask - writing: 010120081f00000000000000
Sat, 31 Oct 2015 14:19:46 GMT hci read local version - writing: 01011000
Sat, 31 Oct 2015 14:19:46 GMT hci write LE host supported - writing: 016d0c020100
Sat, 31 Oct 2015 14:19:46 GMT hci read LE host supported - writing: 016c0c00
Sat, 31 Oct 2015 14:19:46 GMT hci read bd addr - writing: 01091000
Sat, 31 Oct 2015 14:19:46 GMT hci onSocketData: 040e0401010c00
Sat, 31 Oct 2015 14:19:46 GMT hci event type = 4
Sat, 31 Oct 2015 14:19:46 GMT hci sub event type = 14