Skip to content

Instantly share code, notes, and snippets.

Avatar

Róbert Oroszi oroce

  • vernsurance
  • Budapest, Hungary
View GitHub Profile
View basic-with-router.js
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
}
View gist:ec3786ba7eff59963842220c3ffc56b4
(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 Jul 16, 2016 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
View gist:eeddcf623ff90dd8fbf8d9e21214b73c

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 / readme.md
Created Apr 13, 2016
Wordpress setup script for scaleway VC1 server
View readme.md

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 / index.js
Created Feb 16, 2016
requirebin sketch
View index.js
// 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 Feb 15, 2016
requirebin sketch
View index.js
// 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 Dec 11, 2015
requirebin sketch
View index.js
// 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');
View flower-power-second-try
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