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 / 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 / example.js
Created January 9, 2022 21:44
Rails erb view embed json in html and retrieve with JS dom
const widgetsData = document.querySelector('.widgets-data');
const widgets = JSON.parse(widgetsData.value);
@wrburgess
wrburgess / dynamic_div_wrapper.html.erb
Created January 9, 2022 21:41
Rails stimulus per-page or per-view controller actions. keywords: javascript, ruby, rails, stimulus, esbuild
<div
class="container-fluid admin <%= params[:controller] %> <%= params[:action] %>"
data-controller="<%= obj.model_name.plural.downcase %>"
data-<%= obj.model_name.plural.downcase %>-action="<%= params[:action] %>"
>
</div>
@wrburgess
wrburgess / date_filter_stacked.html.erb
Last active January 7, 2022 23:07
Form Templates - erb ruby rails html form input select textarea text number checkbox bootstrap5
<label class="label">License Period Start Date</label><br/>
<div class="input-group mb-3">
<div>
<span class="input-group-text label-from">From</span>
<input placeholder="From" type="date" name="q[license_period_start_date_gteq_datetime]" id="license_period_start_date_gteq_datetime" value="<%= params.dig(:q, :license_period_start_date_gteq_datetime) %>">
</div>
<div>
<span class="input-group-text label-to">To</span>
<input placeholder="To" type="date" name="q[license_period_start_date_lteq_datetime]" id="license_period_start_date_lteq_datetime" value="<%= params.dig(:q, :license_period_start_date_lteq_datetime) %>">
</div>
@wrburgess
wrburgess / conferences.md
Created February 4, 2020 21:44
Conference Options

Thinking

With a large chunk of the team aiming for GopherCon, I wanted to see if you all thought there was value in my going to something completely different, but I'm game to head to GopherCon due to the team-learning aspect, too.

Subjects

As I took a look at the various things I might learn for the new team, these subjects came to mind:

  • Front-end (JS)
  • Security
@wrburgess
wrburgess / clear-sidekiq-jobs.sh
Created January 22, 2020 04:45 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
@wrburgess
wrburgess / gist:b82c88d2d643ae320d3a858ec63b97aa
Created November 27, 2019 15:25
Delete all local branches except for master
git branch | grep -v "master" | xargs git branch -D
@wrburgess
wrburgess / example.js
Created October 10, 2019 15:58
javascript es6 default params
// When you set a function parameter to `(arg = val)` that sets the default
// for the argument. It is not a forced assignment.
//
// Example:
function postSomething(name = 'Megan') {
console.log('name:', name);
}
postSomething(); // console logs 'name: Megan'
@wrburgess
wrburgess / example.js
Created September 19, 2019 14:19
React useState with single object
const { useState } = React;
function signupUser() {
return new Promise(resolve => {
setTimeout(resolve, 1000);
});
}
const initialState = {
username: "",