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
alfonmga / coinbase-timezones.html
Last active Sep 10, 2019
Coinbase.com 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
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
end
jemalloc_so = ENV.fetch('LD_PRELOAD','') if jemalloc_so.nil?
@garybernhardt
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"
fi
done
@chendo
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)
end
Pry.hooks.add_hook(:after_eval, "go_interactive") do |result, pry|
current.after_eval(result, pry)
end
@Jachimo
Jachimo / README.md
Created Jun 2, 2018
Using ZeroTier to route between two UniFi USG LANs
View README.md

Routing between two UniFi USG based LANs with ZeroTier

Intro

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 192.168.1.0/24 (call this the "left" network) and 192.168.10.0/24 (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
greigdp / xps-9370.md
Created Feb 3, 2018
Dell XPS 13 (9370) Archlinux Install Notes
View xps-9370.md

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
dblandin / buildkite-build-bootstrap.sh
Created Nov 30, 2017
buildkite docker build EC2 instance setup
View buildkite-build-bootstrap.sh
#!/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 http://169.254.169.254/latest/meta-data/placement/availability-zone)
ID=$(curl --show-error --silent http://169.254.169.254/latest/meta-data/instance-id)
REGION=$(printf "%s" "$AZ" | sed 's/.$//')
set_instance_health() {
@nruth
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
# https://stackoverflow.com/questions/43143014/chrome-is-being-controlled-by-automated-test-software/43145088
# https://sqa.stackexchange.com/questions/26051/chrome-driver-2-28-chrome-is-being-controlled-by-automated-test-software-notif
# http://stackoverflow.com/questions/12211781/how-to-maximize-window-in-chrome-using-webdriver-python
# update sources for new Options object
# https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings
# https://github.com/teamcapybara/capybara/blob/master/lib/capybara/selenium/driver.rb
begin
@shitsukoi
shitsukoi / ag_install.sh
Last active Mar 26, 2019
Install ag / the silver searcher on amazon linux
View ag_install.sh
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 https://github.com/ggreer/the_silver_searcher.git
View rails_single_file.rb
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
You can’t perform that action at this time.