Skip to content

Instantly share code, notes, and snippets.

View Bachmann1234's full-sized avatar

Matt Bachmann Bachmann1234

View GitHub Profile
@Bachmann1234
Bachmann1234 / import-rds-certs.sh
Last active November 15, 2022 20:09 — forked from shareefhiasat/import-rds-certs.sh
import RDS certificates to java keystore on alpine / osx
#!/bin/zsh
set -euo pipefail
IFS=$'\n\t'
# i tried it and working like charm just have to note make the file .sh chmod +x and you may need sudo to run with permission but be carefull with sudo
# be sure the $JAVA_HOME is configure correctly or make it static as commentedline 7 below
OLDDIR="${PWD}"
CACERTS_FILE=$(/usr/libexec/java_home -v 1.8)/jre/lib/security/cacerts
mkdir /tmp/rds-ca && cd /tmp/rds-ca
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.jupiter.api.extension.ExtensionContext
import org.junit.jupiter.api.extension.ParameterContext
import org.junit.jupiter.api.extension.ParameterResolver
class BasicParameterResolver : ParameterResolver {
@Bachmann1234
Bachmann1234 / triggers.kt
Created August 17, 2022 22:53
Triggers false warning in intellij
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.jupiter.api.extension.ExtensionContext
import org.junit.jupiter.api.extension.ParameterContext
import org.junit.jupiter.api.extension.ParameterResolver
class BasicParameterResolver : ParameterResolver {
@Bachmann1234
Bachmann1234 / hook.py
Created July 26, 2022 14:43
Webhook dumper
from flask import Flask, request
import json
from pygments import highlight
from pygments.formatters.terminal256 import Terminal256Formatter
from pygments.lexers import get_lexer_by_name
app = Flask(__name__)
@app.route("/")
@Bachmann1234
Bachmann1234 / server.py
Created April 25, 2020 20:37
Example graphql server
import uvicorn
from graphene import (
ObjectType,
String,
Schema,
AbstractType,
Field,
Int,
List,
Mutation,
@Bachmann1234
Bachmann1234 / keybase.md
Created May 28, 2019 17:35
Keybase Verification

Keybase proof

I hereby claim:

  • I am bachmann1234 on github.
  • I am bachmann (https://keybase.io/bachmann) on keybase.
  • I have a public key ASBxcuyyEdg9vOylvD7rIbiE4uwajE4gR5vZZNb8Y7kkQwo

To claim this, I am signing this object:

@Bachmann1234
Bachmann1234 / i589.json
Created December 15, 2018 21:17
I589 2018 fields
[ {
"description" : "Part. A. 1. Information About You. 1. Enter Alien Registration Number (A. Number), if any.",
"absolutePath" : "form1[0].#subform[0].PtAILine1_ANumber[0]",
"relativePath" : "PtAILine1_ANumber[0]",
"fieldType" : "TEXT",
"value" : ""
}, {
"description" : "Part. A. 1. Information About You. 2. Enter U. S. Social Security Number, if any.",
"absolutePath" : "form1[0].#subform[0].TextField1[0]",
"relativePath" : "TextField1[0]",
@Bachmann1234
Bachmann1234 / Output
Last active March 26, 2018 16:17
Christmas Unicode!
billy gets 🎁
jill gets 💩
Jen gets 🎁
@Bachmann1234
Bachmann1234 / check.js
Created April 5, 2015 00:19
IKEA stock check
var ITEMS_TO_CHECK = [
"S49022524",
"S99022526",
"S59022528",
"S19022530",
"S79022532",
"S39022534",
"S49022538",
"S09022540"
];
@Bachmann1234
Bachmann1234 / montyhall.py
Last active October 5, 2017 20:19
Monty Hall Simulator
#!/usr/bin/env python3
import random
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
NUM_ROUNDS = 100000
def _get_doors():
doors = [False, False, False]