Skip to content

Instantly share code, notes, and snippets.

Steve Le Roy Harris simlrh

Block or report user

Report or block simlrh

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
simlrh / composable.ts
Last active Jun 10, 2019
Typescript compose and pipe "infix operators"
View composable.ts
interface Composable<B,C> {
(b: B): C;
I: <D>(f: (c: C) => D) => Composable<B,D>;
o: <A>(f: (a: A) => B) => Composable<A,C>;
* Non-type safe internal function - type safety of result is guaranteed by
* allowing creation only through `I` and `o` functions and methods
simlrh / indentation.vim
Created Feb 6, 2017
Indentation functions for vim
View indentation.vim
" Indentation options {{{1
let g:mytabcolumns = 4
set noexpandtab
set softtabstop=0
set shiftwidth=4
set tabstop=4
simlrh / Bool.js
Last active Feb 4, 2017
combineConnected example
View Bool.js
import React from "react";
import { connect } from "react-redux";
// reducer thinks state is just a boolean
export const reducer = (state = false, action) => {
switch (action.type) {
case 'TOGGLE':
return !state;
return state;
simlrh / abc.js
Created Jan 26, 2017
Tree shaking example
View abc.js
import { d, e, f } from "./def.js";
// a is used
export const a = d + " is part of a";
// b is unused
export const b = e + " is part of b";
// c is unused
export const c = f + " is part of c";
simlrh / comment.html
Created Nov 23, 2016
jekyll-github-comments Example Templates
View comment.html
<div class="comment">
<div class="avatar">
<img src="{{ | gravatar }}?d=mm">
<div class="content">
<span class="author">{{ }}</span>
<div class="metadata">
{% if %}
<span class="date">
{{ | date_to_string }}
simlrh / concat.rb
Created Nov 15, 2016
Use Liquid's new array concatenation in Jekyll
View concat.rb
module Jekyll
module ConcatFilter
def concat(one, two)
simlrh / index.rb
Created Nov 11, 2016
A quick and dirty Jekyll plugin to remove 'index.html' from the end of urls when using a clean permalink scheme
View index.rb
# Usage: {{ post.url | remove_index }}
module Jekyll
module RemoveIndexFilter
def remove_index(input)
url = if input
input.split("/")[0..-2].join("/") + "/"
simlrh / osvr_server_config.json
Created Nov 11, 2016
OSVR-firmata server config
View osvr_server_config.json
"description": "The default config file, as used with the HDK, is fully auto-detected, so no configuration required. See the JSON-Schema for server config or other samples to see possible options.",
"aliases": {
"/controller/right/joystick/x": "/je_nourish_firmata/StandardFirmata.ino-X.Y/analog/0",
"/controller/right/joystick/y": "/je_nourish_firmata/StandardFirmata.ino-X.Y/analog/1",
"/controller/right/joystick/button": "/je_nourish_firmata/StandardFirmata.ino-X.Y/button/0"
simlrh /
Created Oct 7, 2016
FreePIE hydra script
global leftHand
global left1
global left2
global left3
global left4
global leftBumper
global leftJoystickButton
global leftMiddle
global leftJoystickX
global leftJoystickY
View steamvr.vrsettings
"jsonid" : "vrsettings",
"perfcheck" : {
"heuristicActive" : true
"steamvr" : {
"allowReprojection" : true,
"forcedDriver": "osvr",
"directMode" : false
You can’t perform that action at this time.