Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
This playbook has been removed as it is now very outdated. |
# Reconfigures ActionDispatch's TLD handling dynamically based on the request | |
# host, so you don't have to mess with config.action_dispatch.tld_length for | |
# cross-device testing using xip.io and friends | |
# | |
# Examples: | |
# use Rack::HostBasedTldLength, /xip\.io/, 5 | |
class Rack::HostBasedTldLength | |
def initialize(app, host_pattern, host_tld_length) | |
@app = app |
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
#!/usr/bin/env ruby | |
# Usage | |
# $ docker-machine create my-machine123 -d virtualbox | |
# $ ruby <(curl -L https://git.io/vvvco) my-machine123 | |
# https://gist.github.com/mattes/4d7f435d759ca2581347 | |
require 'erb' | |
bootlocalsh = %Q(#/bin/bash |
'use strict' | |
var gulp, sass, babelify, browserify, watchify, source, util; | |
gulp = require('gulp'); | |
sass = require('gulp-sass'); | |
babelify = require('babelify') | |
browserify = require('browserify'); | |
watchify = require('watchify'); | |
source = require('vinyl-source-stream'); |
// Existing commands that used to be 'pane:split-*' | |
'pane:split-left-and-copy-active-item' | |
'pane:split-right-and-copy-active-item' | |
'pane:split-up-and-copy-active-item' | |
'pane:split-down-and-copy-active-item' | |
// New commands to create splits | |
'pane:split-left' | |
'pane:split-right' | |
'pane:split-up' |
This SQL creates a Postgres function to generate sequential, numeric, unique IDs in a consistent format across services. Useful for database sharding or microservices.
Draws heavily on Instagram's ID generator, via Rob Conery, with minor modifications.
The main changes are that the unique number resolution is per-second rather than per-millisecond. This is to reduce key size below 2^53^-1 so that generated IDs that are under Javascripts Number.MAX_SAFE_INTEGER
limit . This is important if you're using these on a Node.js server (e.g. our use case is an Express API using Hashids).
Max IDs are in the order of 51 bits, broken down as follows: