Skip to content

Instantly share code, notes, and snippets.

# After building a new Linode Ubuntu 13.04 image...
ssh root@linode-123
# ...
uname -a
# Linux li348-235 3.12.9-x86_64-linode37 #1 SMP Mon Feb 3 10:01:02 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
apt-get update
apt-get install -y linux-virtual grub-legacy-ec2

react-arduino

React has revolutionized the way we write user interfaces. It brings an extremely simple mental model to the authoring of UIs. React-native, react-canvas, and other projects have shown us that this model extends beyond the browser DOM.

I believe that this functional, predictable approach can also revolutionize how we build real-world user interfaces.

@audionerd
audionerd / middleman_mustache.rb
Created March 13, 2012 02:24
Mustache support for Middleman
require 'tilt-mustache'
# Mustache Renderer
module Middleman::Renderers::Mustache
class << self
def registered(app)
# Mustache is not included in the default gems,
# but we'll support it if available.
begin
const getAllPropertyNames = require('./get_all_property_names'),
Mutex = require('./mutex')
function actor(object) {
let methods = getAllPropertyNames(object),
mutex = new Mutex(),
wrapper = {}
for (let method of methods) {
if (typeof object[method] !== 'function') continue
@Boldewyn
Boldewyn / git-get
Last active December 22, 2016 10:37
The `git get` command to replace `git pull` with a sophisticated rebase strategy
#!/bin/bash
#
# git get
#
# Place this script in your path, so that git(1) can find it. Presto!
# You can now type `git get` instead of `git pull` and enjoy the
# advantages of rebasing atop instead of merging remote changes.
#
# If you have local changes, use `git get --stash` to stash and
# pop afterwards your changes automatically.
@brampersandon
brampersandon / clean-react-native-app.sh
Last active January 7, 2019 15:43
A quick helper util for getting a misbehaving React Native environment back to normal.
alias clean-rn="watchman watch-del-all && rm -fr $TMPDIR/npm* && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && yarn cache clean && rm -rf ios/build && rm -rf ios/Pods && rm -rf android/.gradle && rm -rf android/.idea && rm -rf android/build && rm -rf android/app/build && rm -rf android/app/app.iml && yarn"
@nhunzaker
nhunzaker / Makefile
Last active February 7, 2019 04:13
Access LMU light sensor on Mac. Also includes the Emacs plugin I use for automatically updating my theme according to ambient light.
all:
gcc light.m -std=c99 -framework Foundation -framework IOKit -o light
clean:
rm -f light
@elnygren
elnygren / I18n.re
Last active January 16, 2020 15:48
Simple ReasonML i18n internationalization example with strong static typing and JS/TS support with GenType
/** Schema for translations, with @genType for TS/JS usage */
[@genType]
type translations = {
helloMessage: string,
helloMessageWithVariable: (~name: string) => string,
};
/** English translations */
[@genType]
let translationsEN = {

Reason

I have heard a lot of complaints about lack of editor integration or flaky editor tooling in the Reason community. At my previous job we had ~3000 modules and ~80k LOC. I'll admit that we were not very vigilant with .rei files or keeping our inter module dependencies really clean so this slowed both bsb and especially reason-language-server down a lot.

In fact so much that people couldn't use reason-language-server anymore on 15" MacBook Pros.

I myself have always used a Merlin based setup since I joined the Reason eco system before reason-language-server, and in our project my setup had never failed. Therefor I went on a quest of setting up 3 of the major editors (Emacs, Vim and VSCode) and documenting how to get them working

#
# Jekyll Generator for SCSS
#
# (File paths in this description relative to jekyll project root directory)
# Place this file in ./_plugins
# Place .scss files in ./_scss
# Compiles .scss files in ./_scss to .css files in whatever directory you indicated in your config
# Config file placed in ./_sass/config.rb
require 'compass'