Skip to content

Instantly share code, notes, and snippets.

View macabreb0b's full-sized avatar

a knee macabreb0b

View GitHub Profile

managing electrolysis pain

topical lidocaine

  • get the presctiption stuff -> 2.5% lidocaine + 2.5% prilocaine
  • apply 3 hours ahead of procedure on the area to be treated
    • (i wear gloves to not numb my hands)
  • cover in "press-n-seal" wrap, stick it to the skin around the edges
  • wear compression shorts / clothing on the area where it's applied
  • as soon as it is exposed to oxygen the pain relieving effect starts to wear off so ask electrologist to only peel it back as you go, and not peel it off all at once
@macabreb0b
macabreb0b / project-tracking.md
Last active June 26, 2024 07:36
will word game project tracking

will word game project tracking

6/25/24

game is working! next steps -

  • make git repo for wordle clone
  • modify for new game rules

6/11/24

@macabreb0b
macabreb0b / Code.gs
Last active January 17, 2024 10:12
email eater - google apps script (with dynamic label support)
// script forked from https://gist.github.com/jamesramsay/9298cf3f4ac584a3dc05
// to start timed execution: select "Install" from the menu above and hit "run"
// to stop timed execution: select "Uninstall" from the menu above and hit "run"
// to initialize a batch run ad-hoc and immediately: select "_processNextBatch" from the menu above and hit "run"
// runbook:
// - namespace labels like ee-
// - name labels like ee-archive-after-8d, ee-delete-after-45d
// - you can give a message more than one label (e.g., ee-archive-after-1d, ee-delete-after-5d)
@macabreb0b
macabreb0b / Code.gs
Last active January 17, 2024 00:40
email eater - google apps script
// script forked from https://gist.github.com/jamesramsay/9298cf3f4ac584a3dc05
// to start timed execution: select "Install" from the menu above and hit "run"
// to stop timed execution: select "Uninstall" from the menu above and hit "run"
// to initialize a batch run ad-hoc and immediately: select "_processNextBatch" from the menu above and hit "run"
const LABELS_TO_DELETE = [
// ... list of labels ...
// 'test-delete-after-label',
'spammy-alerts',
// 'delete-after-30d',
@macabreb0b
macabreb0b / autodelete_bot.py
Last active December 14, 2023 20:34
discord autodelete bot script
# sourced from https://pastebin.com/12UpbQHT
import discord
from discord.ext import tasks, commands
from datetime import datetime, timedelta
bot_token = "some-bot-token"
# replace with your channel ID
channel_id = 1111
bot_prefix = "!"
@macabreb0b
macabreb0b / button_click_trumps_form_submit.html
Created May 30, 2018 22:46
calling preventDefault on button.click event stops form.submit from triggering
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>preventDefault on button.click stops form.submit from triggering</title>
<style>
</style>
</head>
<body>
<form>
@macabreb0b
macabreb0b / html5-blank-template
Last active October 16, 2018 18:17 — forked from iwek/html5-blank-template
HTML5 Blank Template with jQuery
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Blank HTML5</title>
<style>
</style>
</head>
<body>
@macabreb0b
macabreb0b / pytest_best_practices.md
Last active January 31, 2018 02:45
Some pytest notes

mocking

mock.Mock() is great. It's the reason that I use Python for small side projects - it makes unit testing a breeze. But over-reliance on mock objects for testing can obscure the meaning of your test (at best), and (at worst) it can create bugs in your test code.

  1. Use spec_set when creating object fakes.
  2. Use autospec=True when stubbing method functionality.

fixtures

Similar to mock.Mock(), Pytest fixtures (functions defined with the decorator @pytest.fixture()) can be super handy for writing unit tests, but if they are overused, they can obscure the meaning of what you're testing.

Some issues with fixtures:

@macabreb0b
macabreb0b / js_class_notation.js
Created December 5, 2017 07:47
Movie Title Typeahead in JS
class MovieTypeaheadNode {
constructor(parent, value) {
this.value = value;
this.parent = parent;
this.children = [];
this.matchingMovies = [];
}
addChild(letter) {
let child = this.childWithValue(letter);
@macabreb0b
macabreb0b / PhotoInput.jsx
Last active October 19, 2017 08:06
handle photo upload with React
import React, { Component } from 'react';
class PhotoInput extends Component {
constructor(props) {
super(props)
this.state = {
fileData: '',
}