Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

aarmea /
Last active April 18, 2024 15:20
OpenCV Python example

This is a set of scripts that calibrates and calculates a depth map from a stereo camera. It is primarily written with this ELP stereo camera in mind, but it theoretically should work with other hardware.

See for a full writeup.

aarmea /
Last active September 11, 2023 11:03
How to migrate, not nuke, your Reddit content

I edited my Reddit comments using a version of Power Delete Suite that I modified to do the following:

  • Include a patch by james2432 on GitHub to add a 5 second delay between every write to avoid running into Reddit's (pre-7/1/23) API limits.
  • Backup comments and self-post text as base64 instead of raw text so that the formatting can be restored.
  • Include the URI-encoded permalink in the edited comment to allow deep links to the comment itself in the mirror. To use this, enable the "Edit comments / self posts" option and put %encoded_permalink% somewhere in your text.

My fork is available here. If you want to do this too, make sure to run this scrip

aarmea /
Last active July 20, 2023 23:46
Open and close an animatronic mouth on a Raspberry Pi GPIO pin
#!/usr/bin/env python
This script animates a motorized mouth on a Raspberry Pi GPIO pin so that it
appears to be speaking alongside the audio on the specified PulseAudio source
(which usually should be a sink's monitor).
Find PA_SOURCE with `pactl list` and look for a monitor device that corresponds
aarmea /
Created August 16, 2017 06:48
OpenCV sample stereo camera usage
import numpy as np
import cv2
# Set up specifically for the ELP 1.0 Megapixel Dual Lens Usb Camera Module ...
# This camera enumerates as two separate cameras, hence the separate `left` and
# `right` VideoCapture instances. For a proper stereo camera with a common
# clock, use one VideoCapture instance and pass in whether you want the 0th or
# 1st camera in retrieve().
aarmea / wp-force-login.php
Created August 29, 2020 16:52
Wordpress Force Login with special roles
Plugin Name: Force Login
Plugin URI:
Description: Easily hide your WordPress site from public viewing by requiring visitors to log in first. Activate to turn on.
Version: 5.4
Author: Kevin Vess
Author URI:
Text Domain: wp-force-login
aarmea / config.yaml
Last active January 17, 2018 07:38
AlexaPi config.yaml
# See here for a detailed discussion:
# See
# to get a better idea of how to set things in here
# Level of log output
# default: INFO
# set to DEBUG for verbose logging
logging: INFO
aarmea / makewin10greatagain.reg
Created October 22, 2016 08:58
Disable automatic reboots with logged in users
Windows Registry Editor Version 5.00

Keybase proof

I hereby claim:

  • I am aarmea on github.
  • I am aarmea ( on keybase.
  • I have a public key whose fingerprint is 39AC BDA7 9EF6 6E60 8651 5881 6643 7436 E180 7300

To claim this, I am signing this object:

aarmea / CapsCtrlEsc.ahk
Last active May 17, 2016 06:10
Caps Lock to Control and Escape
; Maps {Caps Lock}+key to {Ctrl}+key and {Caps Lock} by itself to {Esc}.
; Does nothing on Remote Desktop windows to prevent conflicts.
; Modified from
SetCapsLockState Off ; This doesn't work on mstsc, so we don't attempt to resend CapsLock manually
SetTitleMatchMode, 2 ; String passed to IfWinActive can be anywhere in the window title
SetTitleMatchMode, Fast
aarmea /
Last active December 14, 2015 05:38
An attempt at deriving the script used to invoke Assignment 3 for Carothers' course in Parallel Programming and Computing at RPI on the provided Blue Gene/Q system
# you should define your own $name_of_executable
$coresPerNode = 16
for nodes in 4 8 16 32 64
for ranksPerCore in 1 2 4
srun -o output-$nodes-$ranksPerCore.txt --nodes=$nodes --ntasks=$((cores*ranksPerCore*coresPerNode)) --overcommit --runjob-opts="--mapping TEDCBA" ./$name_of_executable