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
package main | |
import ( | |
"fmt" | |
"log" | |
"os/exec" | |
"runtime" | |
) | |
type Worker struct { |
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
#files .file .data pre, | |
#files .file .line-data, | |
#files .file .line-number, | |
code, | |
pre, | |
.blob-code, | |
.blob-code-inner, | |
#readme div.plain pre { | |
font-family: 'Ubuntu Mono', monospace !important; | |
font-variant-ligatures: contextual !important; |
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
for row in $(echo "$(sudo lxc list --format json)" | jq -r '.[] | @base64'); do | |
_jq() { | |
echo ${row} | base64 --decode | jq -r ${1} | |
} | |
sudo lxc delete --force $(_jq '.name') | |
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
# update brew | |
brew update | |
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core | |
# fork https://github.com/Homebrew/homebrew-core | |
git fetch --all | |
git checkout master | |
git pull | |
git push <FORK> |
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
def create_or_update_snap_builder(self, name, owner, version, repo, branch, track): | |
""" Creates a new LP builder for snap with a specific git branch to build from | |
""" | |
lp_snap_name = f'{name}-{version}' | |
lp_snap_project_name = f'snap-{name}' | |
lp_owner = self.owner(owner) | |
if not isinstance(track, list): | |
track = [track] |
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
#!/bin/sh | |
# | |
# Delete a VPC and its dependencies | |
if [ -z "$1" ] then | |
echo "usage: $0 <vpcid>" | |
exit 64 | |
fi | |
vpcid="$1" |
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
#!/bin/bash | |
set -eu | |
_UID=$(id -u) | |
GID=$(id -g) | |
# give lxd permission to map your user/group id through | |
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root | |
# set up a separate key to make sure we can log in automatically via ssh | |
# with $HOME mounted |
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
#!/bin/bash | |
# jenkins master vitals | |
CI_MASTER_HOST="ci-1.youdevise.com" | |
CI_MASTER_PORT="80" | |
# node vitals | |
NODE_HOST="tom-denley-rocks-01.youdevise.com" | |
NODE_NAME="tom-denley-rocks-name-01" | |
NODE_DESC="my node of glory" |
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
#!/bin/bash | |
set -e | |
set -u | |
CI_MASTER_URL="http://ci-1" | |
node_online() { | |
curl --silent "$CI_MASTER_URL/computer/$1/api/json" | grep --silent '"temporarilyOffline":false' | |
} |
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
_BUCKET_NAME="foo.example.com" | |
_POLICY=$(cat <<EOT | |
{ | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid":"PublicReadForGetBucketObjects", | |
"Effect":"Allow", | |
"Principal": "*", | |
"Action":["s3:GetObject"], |