Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@mcandre
mcandre / noctigon-kr4-guide.md
Last active March 3, 2024 07:42
Noctigon KR4 Guide
View noctigon-kr4-guide.md

Noctigon KR4 Guide

Overview

The Noctigon KR4 flashlight features a wealth of customizable features, based on the portable Anduril firmware standard. The firmware standardizes many competing flashlight control mechanisms into a single, repeatable operation workflow.

Batteries

KR4 works well with reputable 18650 Li-Ion unprotected ("flat top") batteries. For additional safety, prefer batteries with verified high CDR ratings, such as Samsung 30Q.

@mcandre
mcandre / fixing-vape-power-loss.md
Last active December 24, 2023 03:42
Fixing Vape Power Loss
View fixing-vape-power-loss.md

Fixing Vape Power Loss

Your mechanical, semimechanical, protected, or boro vape mod frequently experiences power loss. But the battery is freshly charged.

The good news is that this problem is usually easy to correct.

Check the (rebuildsble) atomizer for circuit faults on a separate, known working mod, preferably a non-boro, protected mod with an an ohm meter. If mecessary, rebuild and rewick the atomizer. Ensure that all electrical surfaces, including screws, are wiped clean. If necessary, select a new coil.

If the atomizer appears to work with other mods, then the problem is likely poor electric conductivity elsewhere in the system. For example, the big drip tip screw that completes a boro mod's circuit. Dust, dirt, ejuice condensate, and other debris will naturally accumulate on electrical components over time.

@mcandre
mcandre / quest-3-bugs.md
Created December 22, 2023 19:01
Quest 3 Bugs
View quest-3-bugs.md

Quest 3 Bugs

Your fully charged Quest 3 headset may suddenly spaz out. You may see weird graphics for a second, followed by loss of power to the screen. Followed by the charging indicator light failing to work.

To temporarily work around this bug, press and hold the power button for an entire thirty seconds.

@mcandre
mcandre / how-to-disable-android-talkback.md
Last active December 18, 2023 19:40
How to Disable Android TalkBack
View how-to-disable-android-talkback.md

How to Disable Android TalkBack

So you're seeing green rectangles everywhere, oh no! You may be hearing a narrator, and none of the UI is working properly. Congratulations, you have turned on Android TalkBack. More generally, this is known as speech over or voice over. It's like hitting the Shift key too long in Windows, with similarly annoying results.

This is unfortunately very easy to do, because there is a stupid, secret gesture for this. As of this writing, the gesture is pressing and holding both the volume up and volume down buttons. But in the future, it could be anything. Whatever the gesture is, try doing it again. If you're lucky, you'll stumble upon the right combination and manage to turn the feature back off.

Rebooting has broken. Rebooting does not fix the problem. There was never a prompt to persist the questionable setting across reboots, but alas here we are anyway.

Swiping and scrolling have broken. You cannot swipe or scroll normally to leave the current application. Nor to activate

@mcandre
mcandre / how-to-treat-black-mold-in-water-bottles.md
Last active December 13, 2023 01:32
How to Treat Black Mold in Water Bottles
View how-to-treat-black-mold-in-water-bottles.md

How to Treat Black Mold in Water Bottles

What is black mold?

Black mold is a common fungus that accumulates in wet environments, such as damp walls and reusable water bottles. It rarely causes severe health conditions, but it is best avoided nevertheless. Black mold is associated with sneezing, coughing, congesting, asthma, and eye irritation. When you see black mold safe choices of response include departing the area, disposing of the moldy object, or cleaning the mold off the object.

Unlike commercial beverages, refillable water bottles are unfortunately easy for black mold and other pathogens to continually reinfect. Even if you filter your water with a purifier, the fact that you have a surface that is often wet and unrefridgerated, produces essentially a petri dish for mold.

Cleaning Process

@mcandre
mcandre / expose_cors.go
Created June 29, 2023 15:43
Expose CORS for local backend development and testing with Google Chrome
View expose_cors.go
func exposeCors(w http.ResponseWriter) {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "*")
w.Header().Set("Access-Control-Allow-Headers", "*")
}
@mcandre
mcandre / docker-fix-missing-images.md
Created May 19, 2023 05:37
Docker Fix Missing Images
View docker-fix-missing-images.md

Docker now defaults to using buildx, which means that images no longer populate the normal docker images list.

When building images, make sure to include the --load option:

$ docker build -t <name> --load .
@mcandre
mcandre / convert-webps-to-gifs.md
Last active May 8, 2023 01:30
Convert .WEBP's to GIF's
View convert-webps-to-gifs.md

Unfortunately, ffmpeg lacks webp decode capability.

Fortunately, ImageMagick features webp decode capability.

$ magick mogrify -format gif *.webp
@mcandre
mcandre / raise-ffmpeg-gif-quality.md
Last active May 8, 2023 01:30
Raise ffmpeg gif quality
View raise-ffmpeg-gif-quality.md
$ ffmpeg -i <source> -vf "fps=30,scale=720:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" <target>.gif
@mcandre
mcandre / how-to-align-macos-terminal-window-dimensions-with-tiling
Created May 3, 2023 03:28
How to Align macOS Terminal Window Dimensions with Tiling
View how-to-align-macos-terminal-window-dimensions-with-tiling
# How to Align macOS Terminal Window Dimensions with Tiling
1. Size the Dock vertically to the desired height.
2. Tile Terminal.app to the desired portion of your screen.
3. Open Terminal preferences -> Profile -> Default profile -> Window.
4. In the Window Size section, tweak the Columns and Rows.
5. Relaunch and retile Terminal.app.
6. If the window launches to a different size than tiled, GOTO step 4.
Note that terminals may use altogether different sizes when presenting demos on another display.