Skip to content

Instantly share code, notes, and snippets.


Bo Jeanes bjeanes

Block or report user

Report or block bjeanes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alfonmga / coinbase-timezones.html
Last active Sep 10, 2019 TZ list
View coinbase-timezones.html
<select name="user[time_zone]" id="user_time_zone">
<option value="American Samoa">(GMT-11:00) American Samoa</option>
<option value="International Date Line West">(GMT-11:00) International Date Line West</option>
<option value="Midway Island">(GMT-11:00) Midway Island</option>
<option value="Hawaii">(GMT-10:00) Hawaii</option>
<option value="Alaska">(GMT-09:00) Alaska</option>
<option value="Pacific Time (US &amp; Canada)">(GMT-08:00) Pacific Time (US &amp; Canada)</option>
<option value="Tijuana">(GMT-08:00) Tijuana</option>
<option value="Arizona">(GMT-07:00) Arizona</option>
<option value="Chihuahua">(GMT-07:00) Chihuahua</option>
ohaddahan / CheckJEMalloc.rb
Last active Mar 14, 2019
Checking if jemalloc is present
View CheckJEMalloc.rb
module CheckJEMalloc
require 'ffi'
extend FFI::Library
def self.je_malloc_exists?(jemalloc_so = nil)
if !jemalloc_so.nil? && !jemalloc_so.is_a?(String)
puts "ArgumentError : Only strings allowed as arguments"
return false
jemalloc_so = ENV.fetch('LD_PRELOAD','') if jemalloc_so.nil?
garybernhardt / gist:c2fceef67bcba989b2742dad88c9170b
Created Sep 17, 2018
Automatically fix rubocop errors, with one commit per error
View gist:c2fceef67bcba989b2742dad88c9170b
rubocop | egrep ' (W|C): ' | cut -d ' ' -f 3 | sort -u | sed 's/:$//' | while read cop; do
git checkout .
rubocop -a --only "$cop";
if [[ $(git diff --stat) != '' ]]; then
git add --all
git commit -m "fix rubocop cop $cop"
chendo / go_interactive.rb
Created Jul 10, 2018
go_interactive lets you interactively write specs
View go_interactive.rb
class GoInteractive
def self.start(*args, **kwargs)
@init ||= begin
Pry.hooks.add_hook(:before_eval, "go_interactive") do |code, pry|
current.before_eval(code, pry)
Pry.hooks.add_hook(:after_eval, "go_interactive") do |result, pry|
current.after_eval(result, pry)
Jachimo /
Created Jun 2, 2018
Using ZeroTier to route between two UniFi USG LANs

Routing between two UniFi USG based LANs with ZeroTier


This is a quick explanation of how to configure both ZeroTier and two Ubiquiti UniFi USGs to allow routing between two IPv4 networks. Both networks are in private (RFC1918) address space and each one has its own DHCP service. There is no need for NAT between them, only IP routing.

The two networks are (call this the "left" network) and (the "right" network) but they can be anything. Also, you can have multiple CIDR blocks on one side or the other of the ZeroTier route; if you do, you just have to create more routing table entries.

greigdp /
Created Feb 3, 2018
Dell XPS 13 (9370) Archlinux Install Notes

Install Notes - Dell XPS 13 (9370) 2018

The laptop works well on Archlinux. A few notes based on the installation guide for the previous version.

Intel GPU Power Saving

Per the Arch wiki, more power can be saved by creating /etc/modprobe.d/i915.confwith the following content:

options i915 modeset=1 enable_rc6=1 enable_fbc=1 enable_guc_loading=1 enable_guc_submission=1 enable_psr=1
dblandin /
Created Nov 30, 2017
buildkite docker build EC2 instance setup
#!/usr/bin/env bash
exec > >(tee /var/log/prepare-instance.log|logger -t prepare-instance -s 2>/dev/console) 2>&1
set -e
AZ=$(curl --show-error --silent
ID=$(curl --show-error --silent
REGION=$(printf "%s" "$AZ" | sed 's/.$//')
set_instance_health() {
nruth / selenium.rb
Last active Aug 15, 2019
translating old capybara selenium/chrome preferences and switches to new
View selenium.rb
# load into test setup after `require 'capybara/rails'`
# some sources for below flags and profile settings
# update sources for new Options object
shitsukoi /
Last active Mar 26, 2019
Install ag / the silver searcher on amazon linux
sudo yum groupinstall "Development tools" -y
echo "Installing perl regex"
sudo yum install -y pcre-devel
echo "Installing compiling stuff"
sudo yum install xz-devel -y
echo "Installing git"
sudo yum install git
cd /usr/local/src
sudo git clone
View rails_single_file.rb
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
gemfile(true) do
source ""
You can’t perform that action at this time.