Skip to content

Instantly share code, notes, and snippets.

Avatar

flprben feliperaul

View GitHub Profile
@hopsoft
hopsoft / prefetch.js
Last active Sep 17, 2020
Turbolinks Prefetching
View prefetch.js
const hoverTime = 400
const fetchers = {}
const doc = document.implementation.createHTMLDocument('prefetch')
function fetchPage (url, success) {
const xhr = new XMLHttpRequest()
xhr.open('GET', url)
xhr.setRequestHeader('VND.PREFETCH', 'true')
xhr.setRequestHeader('Accept', 'text/html')
xhr.onreadystatechange = () => {
@operatino
operatino / MySQL_5-7_macOS.md
Last active Sep 17, 2020 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew
View MySQL_5-7_macOS.md

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, 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 https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@ccollicutt
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
vars:
- sysbench_source_location: "/usr/local/src/sysbench"
tasks:
- name: install percona apt key
apt_key:
View patch-edid.rb
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@jonleighton
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|
Honeybadger.notify(
error_class: "DEPRECATION WARNING",
error_message: payload[:message],
backtrace: payload[:callstack]
)
end
@matthiasg
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;
You can’t perform that action at this time.