Skip to content

Instantly share code, notes, and snippets.

View Zeerg's full-sized avatar
💾
⃐ ⃑ ⃒ ⃓ ⃔ ⃕ ⃖ ⃗ ⃘ ⃙ ⃚ ⃛ ⃜ ⃡ ⃥ ⃦ ⃧ ⃨ ⃩ ⃪ ͣ ͨ ͩ ͤ ͪ ͥ ͫ ͦ ͬ ͭ ͧ ͮ ͯ

Tom Zeerg

💾
⃐ ⃑ ⃒ ⃓ ⃔ ⃕ ⃖ ⃗ ⃘ ⃙ ⃚ ⃛ ⃜ ⃡ ⃥ ⃦ ⃧ ⃨ ⃩ ⃪ ͣ ͨ ͩ ͤ ͪ ͥ ͫ ͦ ͬ ͭ ͧ ͮ ͯ
View GitHub Profile
@Zeerg
Zeerg / aws_cli.groovy
Created July 8, 2019 19:12
Jenkins AWS CLI Examples
#### Get Network ACLS from the AWS API using aws cli
def p = 'aws ec2 describe-network-acls --output text'.execute() | 'grep NETWORKACLS'.execute() | ['awk', '{ print $3 }'].execute()
p.waitFor()
return p.text.tokenize()
### More to come
@tobywf
tobywf / boto3-gzip.py
Last active October 18, 2023 17:32
GZIP compressing files for S3 uploads with boto3
from io import BytesIO
import gzip
import shutil
def upload_gzipped(bucket, key, fp, compressed_fp=None, content_type='text/plain'):
"""Compress and upload the contents from fp to S3.
If compressed_fp is None, the compression is performed in memory.
"""
@Zeerg
Zeerg / newcert.py
Last active March 21, 2024 17:22
Python script to generate CSR/Self Signed Cert. Needs pyOpenssl and python-whois
#!/usr/bin/python
from OpenSSL import crypto
import os
import sys
import datetime
import whois
#Variables
TYPE_RSA = crypto.TYPE_RSA
TYPE_DSA = crypto.TYPE_DSA
@dimsemenov
dimsemenov / vcl-regex-cheat-sheet
Last active March 12, 2022 19:01
Regular expression cheat sheet for Varnish (.vcl). Examples of vcl regexp. Found here http://kly.no/varnish/regex.txt (by Kristian Lyngstøl)
Regular expression cheat sheet for Varnish
Varnish regular expressions are NOT case sensitive. Varnish uses POSIX
regular expressions, for a complete guide, see: "man 7 regex"
Basic matching:
req.url ~ "searchterm"
True if req.url contains "searchterm" anywhere.
req.url == "searchterm"