Skip to content

Instantly share code, notes, and snippets.

View tedivm's full-sized avatar

Robert Hafner tedivm

View GitHub Profile
@tedivm
tedivm / README.md
Last active April 3, 2020 22:56
JSON Lines to CSV

Installation

  1. Copy the jsonl_to_csv.py to your filesystem.
  2. Give it permissions to run using the command chmod +x jsonl_to_csv.py
  3. To get the full help documentation run ./jsonl_to_csv.py
@tedivm
tedivm / packer_iam.tf
Created September 10, 2020 04:29
Packer IAM Role in Terraform
data "aws_caller_identity" "current" {}
data "aws_region" "current" {}
locals {
rolename = "${local.identifier}-${data.aws_region.current.name}"
}
data "aws_iam_policy_document" "packer" {
@tedivm
tedivm / emprise_dump
Created February 9, 2021 05:15
Emprise Data
Roberts-MacBook-Pro-3:emprise robert$ node server/cli.js dump |
Compilation WARNING (equipment "basic_healing" from "/Users/robert/Repositories/emprise/game/items/potions.yaml"): Missing recommended parameter "description".
Compilation WARNING (equipment "advanced_healing" from "/Users/robert/Repositories/emprise/game/items/potions.yaml"): Missing recommended parameter "description".
Compilation WARNING (equipment "druid_staff" from "/Users/robert/Repositories/emprise/game/items/weapons.yaml"): Missing recommended parameter "description".
Compilation WARNING (equipment "crappy_sword" from "/Users/robert/Repositories/emprise/game/items/weapons.yaml"): Missing recommended parameter "description".
Compilation WARNING (adventure "cabin_hidden_map" from "/Users/robert/Repositories/emprise/game/locations/forest/cabin/adventures/hidden_map.yaml"): Missing recommended parameter "description".
Compilation WARNING (equipment "map_to_grove" from "/Users/robert/Repositories/emprise/game/locations/forest/cabin/adventures/
@tedivm
tedivm / dockerfile
Created September 2, 2021 20:22
Tiny Random Docker
FROM alpine
# Every build is unique
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
@tedivm
tedivm / aws_login.yml
Last active May 26, 2025 05:35
AWS ECR Github Actions OIDC
jobs:
deploy:
name: Push to ECR
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
@tedivm
tedivm / authorized_keys_command.sh
Created November 12, 2021 23:10
OpenSSH Authorized Keys Command
#!/usr/bin/env bash
# Explicit "allow" list in case Github users overlap with system users
ALLOWED_USERS="tedivm"
KEY_URL="https://github.com/${1}.keys"
if [[ -z $1 ]]; then
>&2 echo "Username required."
exit 1
fi
@tedivm
tedivm / convert.sh
Last active January 12, 2022 14:56
Github Private to Internal
#!/usr/bin/env bash
# The "Internal" visibility is still in preview in the API.
# We cannot filter private and internal, so this script will
# convert internal to internal.
CONVERT_TO="internal"
if [[ -z "$1" ]]; then
echo "Organization required"
exit 1
@tedivm
tedivm / queuerunner.py
Created February 15, 2022 16:46
Rob's QueueRunner
import logging
import multiprocessing as mp
import signal
import time
from queue import Empty, Full
from typing import Callable
import psutil
from pydantic import BaseSettings
Twitter ID Screen name Followers Removal observed Before After
17461978 SHAQ 15612791 2022-02-26T22:24:52Z SHAQ.ETH SHAQ.SOL
21910850 jakeowen 2119904 2022-02-26T15:45:18Z jakeowen.eth Jake Owen
7846 ijustine 1811449 2022-03-09T14:43:37Z iJustine.eth iJustineUltra
1666038950 BoredElonMusk 1752290 2022-02-17T08:05:47Z bored.eth Bored
381051960 ethRuby 1267133 2022-03-19T08:08:11Z CryptoSolis.eth Ruby
1282418324228337665 wsbmod 832406 2022-02-24T06:52:07Z wsbmod.eth wsbmod
20882981 EclecticMethod 495235 2022-02-18T04:39:30Z eclecticm.eth Eclectic Method
811350 alexisohanian 479340 2022-02-08T06:31:55Z AlexisOhanian.eth 7️⃣7️⃣6️⃣ Alexis Ohanian 7️⃣7️⃣6️⃣
22784458 Fwiz 410813 2022-03-22T08:54:42Z Ryan Wyatt - fwiz.eth 💜 Ryan Wyatt - @ GDC
@tedivm
tedivm / plan.json
Created April 13, 2022 20:22
Terraform Plan Example
{
"format_version": "1.0",
"terraform_version": "1.1.7",
"planned_values": {
"root_module": {
"resources": [
{
"address": "random_integer.network",
"mode": "managed",
"type": "random_integer",