Skip to content

Instantly share code, notes, and snippets.

View ASteinheiser's full-sized avatar

Andrew Steinheiser ASteinheiser

View GitHub Profile
@ASteinheiser
ASteinheiser / fast-led-photon.ino
Created September 29, 2018 00:33
FastLED running on a Particle Photon powering a strip of NeoPixels.
// This #include statement was automatically added by the Particle IDE.
#include <FastLED.h>
FASTLED_USING_NAMESPACE;
#define LED_PIN D2
#define CHIPSET NEOPIXEL
#define NUM_LEDS 144
#define BRIGHTNESS 255
@ASteinheiser
ASteinheiser / android-responsive-splash-screen.xml
Last active October 9, 2018 19:13
this is the `launch_screen.xml` file for `react-native-splash-screen`
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white">
<ImageView
android:src="@drawable/launch_screen"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
@ASteinheiser
ASteinheiser / contact-me-lambda.js
Last active November 27, 2018 17:13
AWS Lambda for my "contact me" form on my personal site, iamandrew.io
const aws = require('aws-sdk');
const ses = new aws.SES({ region: 'us-west-2' });
const MY_EMAIL = 'me@iamandrew.io';
exports.handler = async (event, context, callback) => {
console.log('event: ', event);
const response = {
statusCode: 200,
@ASteinheiser
ASteinheiser / Proxmark3-setup-and-commands.md
Last active August 29, 2022 04:41
Commands for using Proxmark3 (Easy and RDV4) with Iceman fork on OSX

Custom compile and flash (OSX)

git clone https://github.com/RfidResearchGroup/proxmark3.git

cd proxmark3

edit the Makefile.platform (configure for your needs)

these settings worked for the proxmark3 easy 256k:

PLATFORM=PM3GENERIC
PLATFORM_SIZE=256
SKIP_ISO14443a=1
@ASteinheiser
ASteinheiser / gpg-key-encryption.md
Last active June 17, 2023 23:38
Commands for basic GPG key message encryption

GPG message encryption basics

Abbreviated flags:

  • -a is --armor for ascii armored output (allows output to be sent via the web, etc.)
  • -r is --recipient for specifying the recipient of the message (needs to use the name of an imported key)

Import a new public GPG key

This can be used for encrypting messages so only the person with the private key can read them

gpg --import ./path/to/public.key
@ASteinheiser
ASteinheiser / memoryUsage.ts
Last active March 5, 2026 17:49
Snippet for debugging memory issues in Node.js applications
import numeral from 'numeral';
setInterval(() => {
const { rss, heapTotal, heapUsed, external } = process.memoryUsage();
console.log('--------------------------------');
console.log('rss: ', numeral(rss).format('0.0 ib'));
console.log('heapTotal: ', numeral(heapTotal).format('0.0 ib'));
console.log('heapUsed: ', numeral(heapUsed).format('0.0 ib'));
console.log('external: ', numeral(external).format('0.0 ib'));