Skip to content

Instantly share code, notes, and snippets.

Rob Richardson robrich

Block or report user

Report or block robrich

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View hello-memsql.sql
CREATE DATABASE hellomemsql;
USE hellomemsql;
CREATE TABLE test (
message text NOT NULL
);
INSERT INTO test (message) VALUES ('this is a sample message');
View memsql-cluster-in-a-box-kubernetes.yaml
# A deployment ensures pod(s) are restarted on failure
apiVersion: apps/v1
kind: Deployment
metadata:
name: memsql
spec:
replicas: 1 # only create one pod (container)
selector:
matchLabels:
app: memsql
View memsql-cluster-in-a-box-docker.yaml
version: '2'
services:
memsql:
image: 'memsql/cluster-in-a-box'
ports:
- 3306:3306
- 8080:8080
environment:
LICENSE_KEY: ${LICENSE_KEY}
@robrich
robrich / AuthorApi.js
Last active Oct 15, 2018
Move from promises to async/await
View AuthorApi.js
import delay from './delay';
import { authors } from './authorData'
//This would be performed on the server in a real app. Just stubbing in.
let maxid = authors.reduce(((currentMax, {id}) => currentMax>id ? currentMax : id), 0 );
const generateId = (author) => {
return ++maxid;
};
@robrich
robrich / hammerhead-from-lrx21o-to-lrx22c.md
Last active Aug 29, 2015 — forked from eyecatchup/hammerhead-from-lrx21o-to-lrx22c.md
@jonmcoe is right, it's trivial to get into stock recovery's options
View hammerhead-from-lrx21o-to-lrx22c.md
  UPDATE `NEXUS 5` 
     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;

A manual OTA for rooted hammerheads, quasi.

@robrich
robrich / hammerhead-from-lrx21o-to-lrx22c.md
Last active Aug 29, 2015 — forked from eyecatchup/hammerhead-from-lrx21o-to-lrx22c.md
@jonmcoe is right: it's trivial to get into recovery mode from the stock recovery
View hammerhead-from-lrx21o-to-lrx22c.md
  UPDATE `NEXUS 5` 
     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;

A manual OTA for rooted hammerheads, quasi.

@robrich
robrich / phxjs-gulpfile.js
Created Jun 19, 2014
sample gulpfile.js created at @phxjs
View phxjs-gulpfile.js
//jshint node:true
'use strict';
var gulp = require('gulp');
var less = require('gulp-less');
var uglify = require('gulp-uglify');
var gulpIf = require('gulp-if');
var express = require('express');
@robrich
robrich / gist:74bff4b51358a3470160
Created May 1, 2014
Experiments on request timeouts when a server isn't listening in different platforms
View gist:74bff4b51358a3470160
/*jshint node:true */
'use strict';
/*
What happens if there's no server listening when we do the request?
- win32: socket.on('timeout' fires and req.abort() fires req.on('error', e) with e.code === 'ECONNRESET'
- else: req.on('error', e) fires imediately with e.code === 'ECONNREFUSED'
*/
var http = require('http');
You can’t perform that action at this time.