Skip to content

Instantly share code, notes, and snippets.

View ndom91's full-sized avatar

Nico Domino ndom91

View GitHub Profile
@jonathan-reisdorf
jonathan-reisdorf / buergeramt.user.js
Last active June 24, 2023 15:10
add "taken" page
// ==UserScript==
// @name Bürgeramt Termin Hunting
// @description Helfer fürs Bürgeramt
// @include htt*://service.berlin.de/terminvereinbarung*
// @version 2.02
// ==/UserScript==
const MIN_RELOAD_DELAY = 60000;
const ADDITIONAL_RELOAD_DELAY = Math.round(Math.random() * 30000);
const HUNTING_CONFIG = {
acceptableDayRange: 99,
@nicknisi
nicknisi / new-worktree.sh
Created January 27, 2022 12:44
Create a new worktree, install dependencies, and run an initial build
#!/usr/bin/env bash
# This script should help facilitate setting up a new worktree, including:
# - creating a new worktree
# - installing dependencies
# - creating a new branch
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
@ndom91
ndom91 / mitmproxy.md
Last active March 25, 2024 07:40
How to use a MITM Proxy with any node app

mitmproxy

How-to man-in-the-middle your own application's traffic for debugging. Below is a quick step-by-step guide to putting mitmproxy between your hard-to-debug application's HTTP(s) network traffic and its destinations. Allowing you to spy on all requests, as well as modify and replay them. Theres a nice blog post with more screenshots and some explanation behind mitm-ing available here: https://earthly.dev/blog/mitmproxy/

1. Install dependencies

  1. global-agent - Global node proxy configuration via environment variables (npm) Optional - only necessary for proxying local node scripts/apps that don't have an explicit proxy option. a. $ npm i -g global-agent
  2. mitmproxy - Popular opensource python man-in-the-middle proxy with web interface (homepage)
# Download Loki
curl -O -L "https://github.com/grafana/loki/releases/download/v2.0.0/loki-linux-amd64.zip"
# Extract Loki's binary
unzip "loki-linux-amd64.zip"
# Make it executable
chmod a+x "loki-linux-amd64"
# Move it to your bin path with the name "loki"
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@rlaneyjr
rlaneyjr / netbox_import.py
Last active July 23, 2020 17:50
Import the devicetype-library into NetBox
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: noai:et:tw=80:ts=4:ss=4:sts=4:sw=4:ft=python
'''
Title: netbox_import.py
Description: Insert records from devicetype-library into NetBox
Author: Ricky Laney
Version: 0.1.5
==============================================================================
@clay584
clay584 / global_entry.py
Last active May 1, 2024 18:13
Global Entry Appointment Notifier
#!/usr/bin/env python
import requests
import time
import sys
from datetime import datetime, timedelta
from twilio.rest import Client
# Idea and details located here. I just added SMS capability
@ndom91
ndom91 / gist:751514c408824113871897543b60e853
Created May 25, 2019 10:12 — forked from vasekch/gist:8e71a93a16881415e5afbd20c6331163
Ubuntu 16.04 Mikrotik L2TP VPN settings
Install l2tp support
sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
sudo apt-get update
sudo apt-get install network-manager-l2tp
sudo apt-get install network-manager-l2tp-gnome
https://askubuntu.com/a/898086
@valmayaki
valmayaki / docker-wait-for-mysql-alt.sh
Last active March 28, 2024 20:41
Wait for Connection ready
#!/bin/sh
until docker-compose exec mysql mysql -h 127.0.0.1 -u $DB_USERNAME -p$DB_PASSWORD -D $DB_DATABASE --silent -e "show databases;"
do
echo "Waiting for database connection..."
sleep 5
done