Skip to content

Instantly share code, notes, and snippets.

View rhodrid's full-sized avatar

Rhodri Davies rhodrid

  • Europe
View GitHub Profile
@rhodrid
rhodrid / rebuild.groovy
Created July 6, 2021 07:21
rebuild.groovy
import hudson.model.*
import jenkins.model.Jenkins
def jobName = '<folder-name>/<job-name>'
def job = Jenkins.instance.getItemByFullName(jobName)
// Make a list of jobs to rebuild. type: int e.g. [2210, 2211]
def myList = [<build-number-1>, <build-number-2>]
for(int item : myList) {
@rhodrid
rhodrid / set_qnap_lcd.sh
Created November 11, 2020 12:19
QNAP LCD control
#!/bin/bash
TEXT="${@:2:$#}"
function printUsage() {
echo "Usage: $0 <off|on>"
echo "Usage: $0 <1|2> Text Message"
exit 0
}
@rhodrid
rhodrid / create-ecr-imagepullsecret.sh
Created May 21, 2019 09:49 — forked from developerinlondon/create-ecr-imagepullsecret.sh
Allow Multi-region Kubernetes to ECR Registry
#!/bin/bash
#
# Create a Kubernetes registry secret for an AWS ECR region
# Requires AWS CLI: https://aws.amazon.com/cli/
# Requires kubectl: https://coreos.com/kubernetes/docs/latest/configure-kubectl.html
#
#
# This secret can be used with 'imagePullSecret' for Kubernetes
@rhodrid
rhodrid / bulk_image_delete.sh
Created August 29, 2018 07:49
Remove all docker image versions
#!/usr/bin/env bash
IMAGE=$1
: ${IMAGE:?"Missing image. Syntax: bulk_image_delete.sh <image>"}
docker images $IMAGE | tail -n +2 | awk '{ print $1 ":" $2}'
echo "Do you want to continue?"
@rhodrid
rhodrid / com.jenkins.ci.plist
Created August 1, 2018 10:57
MacOS: Run Jenkins Slave as a Service
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.jenkins.ci</string>
<key>UserName</key>
<string>jenkins</string>
<key>SessionCreate</key>
<true/>
@rhodrid
rhodrid / pandoras_vox.md
Last active May 11, 2018 12:41 — forked from kolber/pandoras_vox.mdown
pandora’s vox: on community in cyberspace

Pandora’s vox: on community in cyberspace

by humdog (1994)

When I went into cyberspace I went into it thinking that it was a place like any other place and that it would be a human interaction like any other human interaction. I was wrong when I thought that. It was a terrible mistake.

The very first understanding that I had that it was not a place like any place and that the interaction would be different was when people began to talk to me as though I were a man. When they wrote about me in the third person, they would say “he.” it interested me to have people think I was “he” instead of “she” and so at first I did not say anything. I grinned and let them think I was “he.” this went on for a little while and it was fun but after a while I was uncomfortable. Finally I said unto them that I, humdog, was a woman and not a man. This surprised them. At that moment I realized that the dissolution of gender-category was something that was happening everywhere, and perhaps it was only just very obvious on the ne

@rhodrid
rhodrid / gist:06c11258df2931b08a60a7fc6acc4e92
Created January 30, 2017 08:53 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@rhodrid
rhodrid / customsshd
Last active September 1, 2020 07:54 — forked from xfreebird/customsshd
#!/bin/bash
INSTALL_PATH="$HOME/scripts"
SCRIPT_PATH="$INSTALL_PATH/customsshd"
LAUNCHCTL_PATH="$HOME/Library/LaunchAgents/com.my.customsshd.plist"
SSH_KEYS_INSTALL_PATH=$HOME/customkeys
SSH_HOST_RSA_KEY=$SSH_KEYS_INSTALL_PATH/ssh_host_rsa_key
SSHD_PORT=50111
SSH_AUTHORIZED_KEYS_PATH="$HOME/.ssh/authorized_keys"
require "socket"
require "rubygems"
require "bundler/setup"
require "celluloid"
module Chat
class ConnectionListener
include Celluloid
@rhodrid
rhodrid / .gitconfig
Created April 18, 2012 13:15
Useful git aliases
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
cob = checkout -b
po = push origin