This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Convert applet to downloadable jnlp | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match http://192.168.1.23/kvms.html | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=1.23 | |
// @grant none | |
// @require https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.7.7/handlebars.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Generate colored entries for the extension AWS Extend Switch Roles [1]. | |
[1] https://chrome.google.com/webstore/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl | |
""" | |
from pathlib import Path | |
from configparser import ConfigParser | |
CONFIG = Path("~/.aws/config").expanduser() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://github.com/junegunn/fzf/wiki/Examples#autojump | |
function _fzf_autojump() { | |
fzf --height 40% --reverse --inline-info | |
} | |
function _fzf_cleanup() { | |
awk '$1 ~ /[0-9]:/ && $2 ~ /^\// { for (i=2; i<=NF; i++) { print $(i) } }' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
import os | |
import shlex | |
from configparser import ConfigParser | |
from copy import deepcopy | |
from pathlib import Path | |
from subprocess import check_call, check_output | |
from ruamel import yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gclone() { | |
local organization | |
local repositories | |
organization="$1" | |
repositories="$(gh repo list -L 1000 "$organization" | fzf --multi --cycle | awk '{print $1}')" | |
for repository in $repositories; do | |
echo "Cloning $repository" | |
gh repo clone "$repository" | |
done | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# On linux side you need iptables | |
# On windows side you need sudo which can be installed with scoop | |
$CidrBlocks = "10.0.0.0/16", "10.1.0.0/16", "10.70.0.0/16", "10.3.0.0/16" | |
$WslIP = "$(wsl -- ip addr show dev eth0 | Select-String -Pattern 'inet ')" | |
$WslIP = $WslIP.Split(' ').Where{ $_.Length }[1].Split('/')[0] | |
function BuildIptablesRoute { | |
param ( | |
[Parameter(Mandatory = $true)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from dataclasses import dataclass, fields | |
from typing import Dict | |
CAMEL_CASE_RE = re.compile(r'([a-z])([A-Z])') | |
@dataclass(frozen=True) | |
class ApiGatewayRequest: | |
headers: Dict[str, str] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Logs begin at Sat 2019-10-19 17:13:06 CEST, end at Tue 2019-12-03 16:16:09 CET. -- | |
Oct 22 22:00:17 jayson-lg systemd[1]: Started ZeroTier One. | |
Oct 23 09:59:20 jayson-lg zerotier-one[17481]: connect: Network is unreachable | |
Oct 23 09:59:20 jayson-lg zerotier-one[17481]: connect: Network is unreachable | |
Oct 23 21:42:00 jayson-lg zerotier-one[17481]: connect: Connection timed out | |
Oct 31 21:08:29 jayson-lg zerotier-one[17481]: connect: Connection refused | |
Oct 31 21:08:29 jayson-lg zerotier-one[17481]: connect: Connection refused | |
Oct 31 21:14:06 jayson-lg zerotier-one[17481]: connect: Connection refused | |
Oct 31 21:14:06 jayson-lg zerotier-one[17481]: connect: Connection refused | |
Oct 31 21:14:06 jayson-lg zerotier-one[17481]: connect: Connection refused |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM killbill/killbill:0.20.0 | |
ADD kpm.yml /var/lib/killbill/kpm.yml | |
# Patch to respect X-Fowarded-Proto and others when running with ELB | |
ADD server.xml.patch ./ | |
RUN patch -p1 < server.xml.patch | |
# Script that setup traps to respect docker stop commands and stop catalina | |
ADD fargate-killbill.sh ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find_kafka_device() { | |
for device in $(nvme list | grep ^/dev | awk '{print $1}') | |
do | |
local found_device="$(nvme id-ctrl -v $device | grep -Po '/dev/[a-z0-9]+' || true)" | |
if [[ -n "$found_device" ]]; then | |
echo "$device" | |
return 0 | |
fi | |
done |
NewerOlder