Skip to content

Instantly share code, notes, and snippets.


John Bolliger skunkworker

View GitHub Profile
skunkworker / gist:93335dbd83d6d22f438e
Created Oct 23, 2014
bundle crt with private key to make a pkcs12 bundle
View gist:93335dbd83d6d22f438e
Make sure that you use the crt file given by your SSL provider. As exporting the certs through openssl can change the type from sha256 to the less secure sha1 and this should be avoided.
$ openssl pkcs12 -export -in NEW_CERT.crt -inkey PRIVATE.key -out NEW_KEYSTORE.p12
skunkworker / vote_group_serializer.rb
Created Apr 11, 2015
votes with active model serializer
View vote_group_serializer.rb
class VotesGroupSerializer < ActiveModel::Serializer
attributes :group_name
has_many :votes
View multiple_bootstrap_modals.js
$(document).ready(function() {
$('.modal').on('', function( event ) {
$(this).removeClass( 'fv-modal-stack' );
$('body').data( 'fv_open_modals', $('body').data( 'fv_open_modals' ) - 1 );
View rails-routes-visualizer.txt
rails r 'File.write("./viz.html", Rails.application.routes.router.visualizer)';
ruby -r webrick -e "s = => 8080, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start";
open "http://localhost:8080/viz.html"
skunkworker / Makefile
Created Mar 10, 2016
Modified makefile for 10.11 el capitan users.
View Makefile
CHAPTERS=book/ \
$(sort $(wildcard book/chapter-*.md))
CONTENTS=book/title.txt \
book/metadata.xml \
book/title.txt \
View stub_google_fonts.rb
# MJML needs to get the fonts
def stub_google_fonts
stub_request(:get, ",400,500,700").
with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Host'=>'', 'User-Agent'=>'Ruby'}).
to_return(:status => 200, :body => "/* cyrillic-ext */
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: 300;

Keybase proof

I hereby claim:

  • I am skunkworker on github.
  • I am johnbolliger ( on keybase.
  • I have a public key ASDIEVOnq3l2azbai2nzpR-uDEXy1qMpkYHaD2s2FRhnGQo

To claim this, I am signing this object:

skunkworker / package_chrome_extension.rb
Last active Mar 7, 2017
Package chrome extension
View package_chrome_extension.rb
# Chrome Extension Packer
# This removes .git, development files and other files specified and then packages up a chrome extension.
# By default the manifest.json that lives in the directory is removed (local development links etc). And replaced with the manifest.json.production file.
require 'find'
require 'fileutils'
require 'json'
extension_directory = "/chrome/"
skunkworker / capybara.rb
Created Jul 21, 2017
Capybara tricks (bootstrap etc)
View capybara.rb
# How to click on a bootstrap check_box with capybara.
find(:css, 'label', text: 'Label text here').click
skunkworker / .travis.yml
Created Sep 2, 2017
Compile Vips 8.5.8 on Travis CI
View .travis.yml
dist: trusty
- chmod +x
- ./
- vips-8.5.8