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 May 21, 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
@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"
View gist:ac84a37b35ce90883069673a8c56f66b
LA LA LAND
1oz Earl Grey Gin *
0.75oz lemon juice
0.5oz St Germain
~3oz Champagne
Shake gin, lemon and St Germain over ice. Pour into flute. Top up with Champagne.
* Earl Grey Gin: seep 1 Earl Grey teabag in 2 cups of gin (e.g. Plymouth) for 2 hours.
You can’t perform that action at this time.