Skip to content

Instantly share code, notes, and snippets.

View wrburgess's full-sized avatar
:shipit:
Shippin'

Randy Burgess wrburgess

:shipit:
Shippin'
View GitHub Profile
@wrburgess
wrburgess / errors.txt
Last active March 11, 2024 19:54
Bridgetown and Bootstrap Icons installation
// solving issues related to these errors
[Frontend] esbuild: frontend bundling started...
[Frontend] ✘ [ERROR] Could not resolve "./fonts/bootstrap-icons.woff2?24e3eb84d0bcaf83d77f904c78ac1f47"
[Frontend]
[Frontend] frontend/styles/index.scss:11855:11:
[Frontend] 11855 │ src: url("./fonts/bootstrap-icons.woff2?24e3eb84d0bcaf83d77f9...
[Frontend] ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Frontend]
[Frontend] ✘ [ERROR] Could not resolve "./fonts/bootstrap-icons.woff?24e3eb84d0bcaf83d77f904c78ac1f47"
@wrburgess
wrburgess / setting_up_active_admin_on_heroku.md
Created March 4, 2012 22:31
Rails App with ActiveAdmin on Heroku #rails #ruby #activeadmin #heroku
@wrburgess
wrburgess / 1_initial_migration.rb
Last active December 7, 2023 14:14
Setting up UUID columns for Rails 5+ models utilizing Postgres 9.4+
class InitialMigration < ActiveRecord::Migration[5.0]
def change
enable_extension "pgcrypto" unless extension_enabled?("pgcrypto")
end
end
@wrburgess
wrburgess / gist:3711050
Created September 13, 2012 00:43
Permanently remove file from Git history

Reference

Remove sensitive files from Git/Github

In Terminal

git filter-branch --index-filter 'git rm --cached --ignore-unmatch [file path/name]' --prune-empty --tag-name-filter cat -- --all

Example:

@wrburgess
wrburgess / exportToFile.ts
Created July 25, 2018 18:06
Using Firebase Functions to create and upload a text file to Firebase Storage using Node and firebase-admin
import * as path from 'path';
import * as os from 'os';
import * as fs from 'fs';
import * as admin from 'firebase-admin';
const exportToFile = async (req, _, next) => {
try {
const fileName = 'test002.csv';
const tempFilePath = path.join(os.tmpdir(), fileName);
@wrburgess
wrburgess / remove_delete_markers.sh
Created July 26, 2023 17:56
aws cli s3 delete all delete markers from bucket bash script
#!/bin/bash
export AWS_PAGER=""
bucket_name="bucket-name"
# List all versions in the bucket
versions=$(aws s3api list-object-versions --bucket $bucket_name --query 'DeleteMarkers')
# Loop through the list of delete markers and delete each one
for version in $(echo "$versions" | jq -r '.[] | @base64'); do
version_json=$(echo "$version" | base64 --decode)
@wrburgess
wrburgess / gist:3131246
Created July 17, 2012 18:50
Getting Started with Foreman
@wrburgess
wrburgess / updating_ruby_with_rvm_on_a_mac.md
Last active April 6, 2023 15:12
Updating Ruby with rvm or rbenv on a Mac

RBENV

  • rbenv install -l
  • rbenv install 2.6.5
  • rbenv local 2.6.5
  • gem install bundler
  • bundle install

RVM

@wrburgess
wrburgess / gist:5528649
Last active November 24, 2022 15:29
Backup Heroku Postgres database and restore to local database

Grab new backup of database

Command: heroku pgbackups:capture --remote production

Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712

Get url of backup download

Command: heroku pgbackups:url [db_key] --remote production

@wrburgess
wrburgess / nokogiri_parse_xml_example.rb
Created March 2, 2012 20:38
Nokogiri parse XML example
doc = Nokogiri::XML(res.body)
@doc = doc.xpath('//mdn').each do |record|
@carriercode = record.at('@carrier').text
end
@carriercode