Skip to content

Instantly share code, notes, and snippets.

Avatar
🧴
Boop!

Braden Douglass braidn

🧴
Boop!
View GitHub Profile
@braidn
braidn / docker-entrypoint.sh
Created Mar 23, 2021
Docker Entrypoint fo Rails
View docker-entrypoint.sh
#!/bin/sh
rm -f tmp/pids/server.pid
bin/rails server -b 0.0.0.0 -p $PORT
@braidn
braidn / .vimrc
Created Aug 11, 2020
Current vimrc
View .vimrc
set nocompatible
call plug#begin('~/.vim/plugged')
set encoding=utf-8
scriptencoding utf-8
set shell=/bin/bash
""Plugs
Plug 'cocopon/iceberg.vim'
@braidn
braidn / docker-compose.yml
Created Aug 5, 2020
Docker Compose for Rails Systems Tests
View docker-compose.yml
version: '3'
services:
chromedriver:
image: selenium/standalone-chrome-debug
ports:
- 5900:5900
container_name: chrome_driver
environment:
VNC_NO_PASSWORD: 1
networks:
@braidn
braidn / Dockerfile
Last active Jun 27, 2020
Crystal Devcontainer
View Dockerfile
ARG VARIANT="20.04"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-ubuntu${VARIANT}
RUN apt-get update && \
apt-get install -y build-essential curl libevent-dev libssl-dev libxml2-dev libyaml-dev libgmp-dev git && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN curl -sL "https://keybase.io/crystal/pgp_keys.asc" | apt-key add - && \
echo "deb https://dist.crystal-lang.org/apt crystal main" | tee /etc/apt/sources.list.d/crystal.list && \
apt-get update
@braidn
braidn / theme.js
Created Feb 6, 2020
Glossier Deck MDX Theme
View theme.js
export default {
fonts: {
body: 'Apercu, sans-serif',
heading: 'Apercu, sans-serif',
monospace: '"Apercu Mono", monospace'
},
colors: {
background: '#f5e3e7',
},
styles: {
@braidn
braidn / js_driver.rb
Created Oct 26, 2018
Capybar JS Driver
View js_driver.rb
module JSDriver
def require_js
Capybara.register_driver :selenium_remote do |app|
Capybara::Selenium::Driver.new(
app,
browser: :remote,
url: 'http://chromedriver:4444/wd/hub',
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.chrome
)
end
@braidn
braidn / docker-compose.yml
Last active Oct 26, 2018
docker compose file for selenium
View docker-compose.yml
version: '3'
services:
chromedriver:
image: selenium/standalone-chrome-debug
ports:
- 5900:5900
environment:
VNC_NO_PASSWORD: 1
web:
build: .
View stack_trace.rb
NameError: uninitialized constant Workers::Subscription
Did you mean? RUBY_DESCRIPTION
const_missing at org/jruby/RubyModule.java:3348
<main> at /src/repo/spec/workers/subscription/cancel_spec.rb:3
require at org/jruby/RubyKernel.java:961
block in -e at -e:1
glob at org/jruby/RubyDir.java:233
<main> at -e:1
@braidn
braidn / avatax_sales_receipt.rb
Last active Jun 26, 2017
Avatax Sales Receipt Return
View avatax_sales_receipt.rb
{"id"=>313728202, "code"=>"25b54cc0-3f49-4f9a-aac7-174a5ee43f70", "companyId"=>636231, "date"=>"2017-06-26", "paymentDate"=>"1900-01-01", "status"=>"Saved", "type"=>"SalesInvoice", "batchCode"=>"", "currencyCode"=>"USD", "customerUsageType"=>"", "customerVendorCode"=>"mohammed@schaden.co.uk", "exemptNo"=>"", "reconci
led"=>false, "purchaseOrderNo"=>"GLO195104244742", "referenceCode"=>"", "salespersonCode"=>"", "taxOverrideType"=>"None", "taxOverrideAmount"=>0.0, "taxOverrideReason"=>"", "totalAmount"=>1.0, "totalExempt"=>1.0, "totalTax"=>0.0, "totalTaxable"=>0.0, "totalTaxCalculated"=>0.0, "adjustmentReason"=>"NotAdjusted", "adju
stmentDescription"=>"", "locked"=>false, "region"=>"NY", "country"=>"US", "version"=>1, "softwareVersion"=>"17.6.3.5", "originAddressId"=>797558954, "destinationAddressId"=>797558955, "exchangeRateEffectiveDate"=>"2017-06-26", "exchangeRate"=>1.0, "isSellerImporterOfRecord"=>false, "description"=>"Spree Order", "busi
nessIdentificationNo"=>"", "modifiedDate"=>"2017-06-26T14:19:00.323
@braidn
braidn / docker_changing.yml
Created May 28, 2017
Docker Compose is A Changing.
View docker_changing.yml
version: '2'
services:
db:
image: kiasaki/alpine-postgres
volumes:
- ./pgdata:/pgdata
environment:
POSTGRES_DB: some_db
POSTGRES_USER: postgres
PGDATA: /pgdata