Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@mcandre
mcandre / anduril-flashlight-guide.md
Last active April 6, 2024 21:08
Anduril Flashlight Guide

Anduril Flashlight Guide

Overview

Popular flashlight models such as the Noctigon KR4 and Sofirn BLF LT1 include a wealth of customizable features, based on the portable Anduril firmware standard. Anduril unifies many proprietary flashlight control mechanisms into a single, repeatable operational workflow.

Unfortunately, some Anduril models neglect to document their true capabilities. We detail core functions here for your convenience.

This is particularly relevant for the Nocticon Emissar KR4 and Sofirn LT1 models, which fail to persist settings when replacing the batteries.

Why I'll never use Affirm again

tldr: I'll never use Affirm again because when there are issues with their payment system that could severely impact your credit score for years, their customer support is unequipped to help and their underlying support infrastructure is poorly designed.

On Jan 3 2022, I purchase a product from a merchant for $271. As part of the purchase, I signed up for a 0% APR installment plan via Affirm to pay the balance in four equal payments over six weeks. The merchant ended up not shipping the product for over two months, by which time I had fully paid off the loan from Affirm, and they were unresponsive to my requests for a shipping date. Because of this, on Mar 10 2022 I initiated a chargeback with my bank (Chase) on the last loan payment, which I paid on Feb 15 2022. As soon as I initiated the chargeback, the merchant became responsive and shipped the product. On Mar 11 2022, I received the tracking number for the purchase and I called Chase to cancel the chargeback.

Since Ma

@Syncrossus
Syncrossus / python_monokaish.nanorc
Last active January 14, 2022 20:33
My attempt at making a Monokai python syntax coloring for nano based on scopatz/nanorc
## Python syntax highlighting rules for Nano
## The colors chosen here may seem strange.
## In my terminal, "yellow" = orange, "magenta" = purple, "brightyellow" = yellow, "cyan" = teal.
## Since there is no actual magenta, I used "brightred" which is the closest I could get.
## Since there is no grey, black is difficult to read in a terminal and setting the background to
## white is harsh on the eyes, I decided to use teal for comments.
syntax "python" "\.py$"
header "^#!.*/(env +)?python[-0-9._]*( |$)"
magic "Python script"
@mcandre
mcandre / show-binary-dependencies.md
Last active April 26, 2021 02:50
Show Dependencies

General UNIX/Linux

$ ldd <binary>

macOS

$ otool -L 
@mcandre
mcandre / windows-install-msvc-and-clang.md
Last active May 1, 2021 02:22
Windows Install MSVC and clang

Windows Install MSVC and clang

  1. Install Chocolatey.
  2. Launch a PowerShell terminal in administrator mode.
  3. Install visualstudio2019community.
  4. Install the Visual Studio 2019 native C++ Desktop workload with the optional MSVC and clang components included:
PS C:\> choco install --force visualstudio2019-workload-nativedesktop --package-parameters "--includeOptional"
@mcandre
mcandre / mac-enable-libfuzzer.md
Created March 19, 2021 18:17
macOS Enable libFuzzer
  1. Run brew install llvm --HEAD.
  2. Update certain shell variables:
# Prefer newer LLVM with fuzzing enabled
# shellcheck source=/dev/null
export CC='clang'
export CXX='clang++'
export LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
PATH="$(brew --prefix)/opt/llvm/bin:$PATH"
@mcandre
mcandre / launch-valorant.md
Created June 16, 2020 16:45
Launch Valorant (from CLI, Steam, GOG, etc.)
"C:\Riot Games\Riot Client\RiotClientServices.exe" --launch-product=valorant --launch-patchline=live
@mcandre
mcandre / microsoft-windows-persist-window-dimensions.md
Created April 15, 2020 13:59
Microsoft Windows Persist Window Dimensions

Microsoft Windows Persist Window Dimensions

  1. Hold Control while selecting the Close button.
  2. Relaunch the application.
@mcandre
mcandre / postgresql-backup-and-restore.md
Last active October 6, 2022 22:24
PostgreSQL Backup and Restore

POSTGRESQL BACKUP AND RESTORE

$ pg_dumpall --clean -U <user> -f backup.sql
$ psql -U <user> -f backup.sql

Warnings

  • A PostgreSQL user with administrative privileges is required.
@mcandre
mcandre / patches.md
Last active November 26, 2019 02:57
patches, bb!