Skip to content

Instantly share code, notes, and snippets.

View bmitchinson's full-sized avatar
🌐
Remote Work

Ben Mitchinson bmitchinson

🌐
Remote Work
  • Software Engineer @ Accenture Industry X
  • Des Moines, IA
  • 00:15 (UTC -05:00)
View GitHub Profile
@bmitchinson
bmitchinson / handbreak_export_all_titles.sh
Created February 6, 2025 00:28
Handbreak CLI command to export all titles
#!/bin/bash
set -e
if [ "$#" -ne 2 ]; then
echo "Usage: $0 example_file.iso destination_folder"
exit 1
fi
src="$1"
@bmitchinson
bmitchinson / copy_media.sh
Last active February 6, 2025 00:47
Photo Copy Script
#!/bin/bash
# Usage: process_media_parallel.sh /path/to/source /path/to/destination
# Requirements: ImageMagick v7 (for the "magick" command)
# copies all mov/mp4/pdfs as is
# copies all images (png/jpg/tiff/heic) to jpgs with max size of 3mb
# copies images from source nested folders into top level destination folder, with src foldername in filename
# creates txt file reporting all files observed but not copied
# Iterated on w GPT o1
@bmitchinson
bmitchinson / gameawards_24_backend.json
Last active December 13, 2024 16:21
gameawards_24_backend
[
{
"category": "Game of the Year",
"options": [
"Astro Bot (Team Asobi/SIE)",
"Balatro (LocalThunk/Playstack)",
"Black Myth: Wukong (Game Science)",
"Elden Ring Shadow of the Erdtree (FromSoftware/Bandai Namco)",
"Final Fantasy VII Rebirth (Square Enix)",
"Metaphor: ReFantazio (Studio Zero/Atlus/Sega)"

TODO: Move this to dev.to/bmitchinson

How to deploy an existing CRA app online in less than 60 seconds using your google account. Aftewards, custom domains can be applied through firebase.

  • npm i -g firebase-tools
  • firebase login
    • Login to your google account using the browser
  • firebase init
  • (arrow down to hosting, space to select hosting circle, enter to continue)
context('Form is rendered on a valid route', function() {
before(() => {
cy.server();
cy.route('POST', '/session', 'fixture:postSessionResponse').as('postSession');
cy.visit('/feedback/1/6');
cy.wait('@postSession');
});
it('Displays all the menu item review components', function() {
cy.get('#tomato\\ bisque');
cy.get('#chicken\\ strips');
// Where should we store these / put a types folder full of definitions?
// 1.) Frontend:
// If we put them in Apricot, when we deploy the backend,
// we'd have to zip up the frontend to include with it, so that the backend
// could import types when it's ran in the EC2. This seems like overhead imo.
// 2.) Backend:
// If we store the types in Blueberry, the frontend will
// reference them during build time only, which is okay in my mind,
// because we never build the frontend in an enviornment where
// Blueberry isn't present for the frontend build step.
import { baseURL } from '../../../cypress';
describe('API Testing with Cypress', () => {
beforeEach(() => {
cy.request(${baseURL}/25).as('pikachu');
});
it('Validate the header', () => {
cy.get('@pikachu')
<style type="text/css">
.coronavirus-banner {
width: 100%;
text-align: center;
padding: 0 2rem 1rem;
}
</style>
<div class="coronavirus-banner">
<h3>Coronavirus (COVID-19) Update:</h3>
<p>We are committed to providing quality health care for our patients during this current pandemic. To learn more about COVID-19 <a href="www.nlfhc.com/covid19_faq.html">click here</a>, to learn more about our Telehealth options <a href="www.nlfhc.com/telehealth_faq.html">click here</a>.</p>
@bmitchinson
bmitchinson / editfiles.py
Created January 13, 2020 02:57
Python script to perform bash operations on specified file types found recursively
import os
import time
from datetime import datetime
import subprocess
# logfile = open("convert_log.txt", "w+")
# def log(s):
# print(s + "\n")
# logfile.write(s + '\n')