Skip to content

Instantly share code, notes, and snippets.

@rtluckie
rtluckie / cert-manager-crds.yaml
Created September 24, 2019 14:26
cert-manager-crds
resources:
- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
name: certificaterequests.certmanager.k8s.io
spec:
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
@rtluckie
rtluckie / unwatermark.sh
Last active July 18, 2017 18:48
Removes annoying watermark links from it-ebooks pdfs
#!/usr/bin/env bash
set -euf -o pipefail
# Usage
# ./unwatermark.sh it-ebooks.info sharefactory.com somefile.pdf
TARGET_PDF=${@: -1}
TARGET_PATH=$(dirname $TARGET_PDF)
BACKUP_PDF=$(echo $TARGET_PDF | sed "s/.pdf$/.pdf.bak/g")
TMP_PDF=$TARGET_PDF.tmp
NEEDLES=${@:1:$(($#-1))}
@rtluckie
rtluckie / keybase.md
Created June 27, 2017 19:53
keybase.md

Keybase proof

I hereby claim:

  • I am rtluckie on github.
  • I am luckie (https://keybase.io/luckie) on keybase.
  • I have a public key whose fingerprint is 9870 BAF8 51C3 68ED 1387 7345 A6FF 7B5B DF30 CDF3

To claim this, I am signing this object:

#cloud-config
users:
- name: core
groups: [docker,sudo]
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDLvD/MRhTwis2uKmTIje1gJzAvj1GQyh78tIp0T+Eq4vZmFvqaOU25/XBVctwHUAt8I/Y1C+DvaTCz0XdScMgpFmAzTMRCD/XZRzRouZVNizUIvrkP4D8UwuoU1D/iiFJ8+gkBwuT2e+gh3azpuKq8nQC+xKc5pPB2Z+hw9IIjOXyCZFiUx/TrwbqoT9vrVSLH0n7tgPhVjOvBP7EHAldD0zv0pzY21VJrNjOakBOcrLeIfKgbFfmugRo4lpqdImbNPgJOe/1NR/86fC1/CN+nwpKf1Mt6kxfGgRh4j+QIVN8FhIpLG5pc4p6qqPY+zC71SSvrrJuwI21crIbVp1w0ayRy216qnCoir3V7GClq96/pBNhO0DY0zybUobTz3KOY1g5VN8gGmGJOkfXL0J1XwwM4Xri0uACu8o8O+lWeYnqhHkGvKTWxV1S5jPkYZa88sSv8DtVKFb7yF/yAX6gcAVt3vRdCNrjZUuvKscySO3vFpwhdxmK+edMJuxHQXm/W6oobFHpT6EOqficpZD8Nu5RLFUlquDoFhEDEUbXACxwMFWQO6sG3EEOdZbzHqZ1jyRbbrPgj7M8Lhb7eFLnOK8910cfQKKVEc7SxGSkkWB+DEy9X6NOAEQ/la0iMRHnvQnNF2/FE69/Eb/KiLujgJ9jbl1296isGMCi8/5tqDw== [email protected]
coreos:
units:
@rtluckie
rtluckie / bash_beautifier.py
Created March 23, 2016 19:13
bash_beautifier.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import sys
class BeautifyBash:
def __init__(self):
self.tab_str = ' '
self.tab_size = 2
@rtluckie
rtluckie / dep_management.py
Created January 3, 2016 20:27
Initial attempt to check installed deps vs deps listed in requirements.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
Initial attempt to check installed deps vs deps listed in requirements.
"""
from __future__ import absolute_import
from __future__ import division
@rtluckie
rtluckie / get_hooks.py
Created June 25, 2015 16:26
restrict branch names
#!/usr/bin/env python
import sys
import os
import subprocess
import logging
import re
import getpass
logging.basicConfig(level=logging.DEBUG, format="%(levelname)s: %(message)s\n")
@rtluckie
rtluckie / stash_set_branch_perms.py
Created June 23, 2015 16:38
bulk set stash branch permssions
import json
import requests
import logging as log
perms = [
{
"matcher": {
"id": "refs/heads/**",
"displayId": "refs/heads/**",
"type": {
@rtluckie
rtluckie / audiocheck.net_download.sh
Created April 23, 2015 17:25
Download all samples from audiocheck.net
BASE_DIR="audiocheck.net"
mkdir ${BASE_DIR} && cd ${BASE_DIR} && \
for PAGE in $(curl http://www.audiocheck.net/soundtestsaudiotesttones_index.php | grep .php | sed 's|.*a href="\.\/\(.*.php\).*|\1|g' | grep php$); do
DIRNAME=$(echo ${PAGE} | sed 's|[a-z0-9]*_\(.*\)\.php|\1|g')
echo "Downloading ${DIRNAME}"
mkdir $(pwd)/${DIRNAME}
for FILE in $(curl http://www.audiocheck.net/${PAGE} | grep download.php | sed 's|.*<A HREF="download.php?filename=\([^\"]*\).*|\1|g'); do
FILE_NAME=$(echo $FILE | sed 's|Audio/audiocheck.net_\(.*\)|\1|g')
DOWNLOAD_TARGET="http://www.audiocheck.net/download.php?filename=${FILE}"
DOWNLOAD_PATH=$(pwd)/${DIRNAME}/${FILE_NAME}