Skip to content

Instantly share code, notes, and snippets.

View d-otis's full-sized avatar
🏠
WFH

Dan Foley d-otis

🏠
WFH
View GitHub Profile
@d-otis
d-otis / details.md
Last active May 22, 2026 22:36
Stems Detail

Crystal Mine: Stems

File Details

.
├── bass
│   ├── crystal_mine__bassDry.wav
│   ├── crystal_mine__bassSyncDelay.wav [🤩floaty fun]
│   └── crystal_mine__bassVerb_middle.wav
├── crystal_mine_preMaster__20260423b.wav [the mix I sent to stereo mastering engineer]

React Testing Library Query Cheat Sheet

Query Use when Returns Throws if not found? Async?
getBy Element is in the DOM right now Element Yes No
queryBy Asserting something is NOT there Element or null No No
findBy Element appears after async work Promise<Element> — must await Yes (timeout) Yes

Patterns

@d-otis
d-otis / extract_har.py
Created April 8, 2022 02:01 — forked from Lewiscowles1986/extract_har.py
Python 3 script to extract images from HTTP Archive (HAR) files
import json
import base64
import os
# make sure the output directory exists before running!
folder = os.path.join(os.getcwd(), "imgs")
with open("src.har", "r") as f:
har = json.loads(f.read())
const axios = require('axios')
async function getCountries(s, p) {
const baseUrl = `https://jsonmock.hackerrank.com/api/countries/search?name=${s}`
const numCountries = await getData(baseUrl, p)
async function getData(url, pop) {
let hasNextPage = true
let hasErrors = false
{
"lat": 33.44,
"lon": -94.04,
"timezone": "America/Chicago",
"timezone_offset": -21600,
"current": {
"dt": 1595243443,
"sunrise": 1608124431,
"sunset": 1608160224,
"temp": 274.75,
const today = new Date()
const dayMap = {
0: "Sunday",
1: "Monday",
2: "Tuesday",
3: "Wednesday",
4: "Thursday",
5: "Friday",
6: "Saturday"
const fs = require('fs')
const path = require('path')
const persistTweetIds = tweets => {
const ids = tweets.map(tweet => tweet.id)
ids.forEach(num => {
fs.appendFileSync(`${path.join(__dirname, '..')}/db/ids.txt`, num + ",", (err) => {
if (err) throw err;
console.log(`"${num}" was appended to file!`);
});
const dotenv = require('dotenv')
dotenv.config({ path: __dirname + '/../.env' })
// @PhilaStreets User ID
const userId = 117424097;
// User Tweet Timeline Endpoint
const url = `https://api.twitter.com/2/users/${userId}/tweets`;
// Auth Token Pulled from .env file located in project root folder
const fs = require('fs')
const persistTweetIds = tweets => {
const ids = tweets.map(tweet => tweet.id)
ids.forEach(num => {
fs.appendFileSync(`${process.cwd()}/db/ids.txt`, num + ",", (err) => {
// err be like: "idk what file or directory you're talking about!"
if (err) throw err;
console.log(`"${num}" was appended to file!`);
});
const dotenv = require('dotenv')
dotenv.config()
// @PhilaStreets User ID
const userId = 117424097;
// User Tweet Timeline Endpoint
const url = `https://api.twitter.com/2/users/${userId}/tweets`;
// Auth Token Pulled from .env file located in project root folder