Skip to content

Instantly share code, notes, and snippets.

hopsoft / prefetch.js
Last active Sep 16, 2021
Turbolinks Prefetching
View prefetch.js
const hoverTime = 400
const fetchers = {}
const doc = document.implementation.createHTMLDocument('prefetch')
function fetchPage (url, success) {
const xhr = new XMLHttpRequest()'GET', url)
xhr.setRequestHeader('VND.PREFETCH', 'true')
xhr.setRequestHeader('Accept', 'text/html')
xhr.onreadystatechange = () => {
operatino /
Last active Sep 8, 2021 — forked from nrollr/
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
ccollicutt / sysbench-install.yml
Last active Nov 18, 2019
Quick Ansible playbook to deploy newest sysbench to an Ubuntu Trusty 14.04 server
View sysbench-install.yml
- hosts:
- mysql-client
- sysbench_source_location: "/usr/local/src/sysbench"
- name: install percona apt key
View patch-edid.rb
# Create display override file to force Mac OS X to use RGB mode for Display
# see
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
jonleighton / gist:7122210
Created Oct 23, 2013
Report Rails deprecation warnings to Honeybadger (useful in production if there might be lines of code not covered by your tests - the horror!). Place this in your config/environments/production.rb
View gist:7122210
ActiveSupport::Notifications.subscribe('deprecation.rails') do |name, start, finish, id, payload|
error_message: payload[:message],
backtrace: payload[:callstack]
matthiasg / docs style (bootstrap)
Created Aug 5, 2013
the callouts from the bootstrap documentation
View docs style (bootstrap)
/* Side notes for calling out things
-------------------------------------------------- */
/* Base styles (regardless of theme) */
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;