Skip to content

Instantly share code, notes, and snippets.


John Bolliger skunkworker

View GitHub Profile
skunkworker /
Created Sep 2, 2017
Vips 8.5.8 install from source for Ubuntu
cd tmp/;
curl -L | tar xz; \
cd vips-8.5.8; \
dpkg --configure -a; \
echo "/usr/local/lib/" >> /etc/; \
./configure; \
make; \
sudo make install;
skunkworker / annotate_models.rb
Created Nov 26, 2017
How to extend annotate gem for more models.
View annotate_models.rb
# add to app/initializers/annotate_models.rb
module AnnotateModels
class << self
# add your type
MATCHED_TYPES = %w(test fixture factory serializer scaffold controller helper serializable).freeze
# the directory they live in, can be more than 1 here
SERIALIZABLE_DIR = File.join('app', "serializers")
skunkworker / .travis.yml
Last active Dec 12, 2017
Rails 5.1 system tests with
View .travis.yml
dist: trusty
- wget
- unzip
- sudo apt-get install libnss3
- sudo apt-get --only-upgrade install google-chrome-stable
- sudo cp chromedriver /usr/local/bin/.
- sudo chmod +x /usr/local/bin/chromedriver
- export DISPLAY=:99.0
skunkworker / dotenv.zsh
Created Feb 17, 2018
fixed dotenv.zsh for loading and excluding comments.
View dotenv.zsh
#! /bin/zsh
function dotenv () {
if [[ $1 =~ $regex ]]; then
if [[ -f $file_name ]]; then
source_env $file_name
skunkworker / nbody.rb
Last active Feb 25, 2018
TruffleRuby is insanely fast. 641s on MRI 2.5.0, (302s on MRI 2.6-preview1 --jit) vs 16.2s on TruffleRuby.
View nbody.rb
# The Computer Language Benchmarks Game
# Optimized for Ruby by Jesse Millikan
# From version ported by Michael Neumann from the C gcc version,
# which was written by Christoph Bauer.
require 'benchmark'
puts Benchmark.measure {
skunkworker / readme.txt
Last active Sep 20, 2018
How to fix valgrind ignoring sigreturn errors on mac os x high sierra.
View readme.txt
git clone;
cd valgrind/
# time to edit some files (see below)
./configure --disable-dependency-tracking --enable-only64bit --build=amd64-darwin
./make install
# done.
skunkworker / config annotate.yml
Last active Oct 11, 2018
Add custom models to Annotate Gem
View config annotate.yml
- interactions/foo/
- interactions/user/bar/
- interactions/baz.rb
- interactions/bar/
- interactions/user/bar/
skunkworker / migrations.rake
Created Oct 18, 2018
Generate clean sql migrations from lol_dba
View migrations.rake
namespace :migrations do
desc 'Generate clean SQL migrations from lol_dba'
task clean_sql: :environment do
sql_migration_files = Dir[Rails.root.join("db", "migrate_sql")+"*.sql"]
sql_migration_files.each_with_index do |sql_file,i|
skunkworker / VolumeMac.ahk
Last active Nov 16, 2018
AutoHotkey mac keyboard play/pause, back/next, volume up, down, mute
View VolumeMac.ahk
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Sendinput, {F10}
skunkworker / fast-font.css
Created Dec 30, 2018
Fast font to look consistent everywhere.
View fast-font.css
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";