Skip to content

Instantly share code, notes, and snippets.

- name: "Get Repo"
run: |
git=/usr/bin/git
refs="refs/remotes/origin/$GITHUB_REF_NAME"
echo "cloning repo: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}"
echo " from branch: $GITHUB_REF_NAME"
echo " commit: ${GITHUB_SHA}"
tokenkey="http.${GITHUB_SERVER_URL}/.extraheader"
AUTH=$( echo -n "x-access-token:${GITHUB_TOKEN}" | base64 )
#
@jwalzer
jwalzer / nginx.conf
Created February 28, 2021 23:15 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@jwalzer
jwalzer / delete-from-v2-docker-registry.md
Created December 17, 2020 10:00 — forked from jaytaylor/delete-from-v2-docker-registry.md
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@jwalzer
jwalzer / mtusize.sh
Created November 24, 2020 12:50 — forked from sebastianw/mtusize.sh
MTU Size
function mtusize {
#set -x
[ -z "$1" ] && { echo "mtusize <host> [<initial data size> <step length>]"; return 1; }
ip=$1
size=${2:-1345}
step=${3:-64}
count=0
minfailed=999999
rstring=("" " failed")
while true; do
@jwalzer
jwalzer / diskchecker.pl
Created May 14, 2019 07:38 — forked from bradfitz/diskchecker.pl
diskchecker.pl
#!/usr/bin/perl
#
# Brad's el-ghetto do-our-storage-stacks-lie?-script
#
sub usage {
die <<'END';
Usage: diskchecker.pl -s <server[:port]> verify <file>
diskchecker.pl -s <server[:port]> create <file> <size_in_MB>
diskchecker.pl -l [port]
@jwalzer
jwalzer / build.sh
Created April 26, 2019 13:09 — forked from julianxhokaxhiu/build.sh
How to build minimal ARM QEMU Static from sources with EXECVE
#!/bin/bash
#
# IMPORTANT!
# At the moment this script is forged only for Debian ( tested on 8.x release ).
# Although my efforts were put on building this also on Arch Linux or Alpine, at the moment only Debian seems to be able to build it.
# Also, not sure why these instructions where nowhere on the internet, therefore I leave them here for whoever need them.
#
###########
# Add Backports repo support
#!/usr/bin/python
import bs4 as BeautifulSoup
import collections
import os
import os.path
import requests
import shutil
import subprocess
import sys
@jwalzer
jwalzer / latest-widevine.sh
Created July 18, 2016 09:54 — forked from ruario/intro-latest-widevine.md
Fetches Chrome and extracts out Widevine so that it can be used by Vivaldi. Also works with other Chromium-based browsers, see guide below.
#!/usr/bin/env bash
available () {
command -v $1 >/dev/null 2>&1
}
# Make sure we have wget or curl
if available wget; then
SILENT_DL="wget -qO-"
LOUD_DL="wget"