Skip to content

Instantly share code, notes, and snippets.

View OldCrowEW's full-sized avatar
👾
Working from 🏕️

John OldCrowEW

👾
Working from 🏕️
View GitHub Profile
{
"data": {
"attributes": {
"is-destroy":false,
"message": "Triggered run from Jenkins"
},
"type":"runs",
"relationships": {
"workspace": {
"data": {
def getWorkspaceId() {
def response = httpRequest(
customHeaders: [
[ name: "Authorization", value: "Bearer " + env.BEARER_TOKEN ],
[ name: "Content-Type", value: "application/vnd.api+json" ]
],
url: "https://app.terraform.io/api/v2/organizations/" + env.TF_ORGNAME + "/workspaces/" + env.TF_WORKSPACE
)
def data = new JsonSlurper().parseText(response.content)
@OldCrowEW
OldCrowEW / readme.md
Created April 23, 2020 16:11 — forked from ubergesundheit/readme.md
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@OldCrowEW
OldCrowEW / .profile
Created November 15, 2018 12:07 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@OldCrowEW
OldCrowEW / .rpmmacros
Created November 13, 2018 18:26 — forked from hnakamur/.rpmmacros
rpm sign
# The original settings confirmed by running: rpm --showrc
# -14: __gpg %{_bindir}/gpg2
# -14: __gpg_check_password_cmd %{__gpg}
# gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
#
# -14: __gpg_sign_cmd %{__gpg}
# gpg --batch --no-verbose --no-armor --passphrase-fd 3
# %{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}}
# --no-secmem-warning
# -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
@OldCrowEW
OldCrowEW / setup-vmware-image-with-static-IP.markdown
Created September 17, 2018 15:38 — forked from pjkelly/setup-vmware-image-with-static-IP.markdown
VMWare Fusion Images with a static IP Address on Mac OS X Snow Leopard

How to setup your VMWare Fusion images to use static IP addresses on Mac OS X

At Crush + Lovely, we use Railsmachine's Moonshine to automate the configuration of our servers. When writing our deployment recipes, VMWare Fusion's ability to take snapshots and rollback to these snapshots is a huge timesaver because it takes just seconds to roll a server image to it's original state.

When you're just configuring a single server, having a static IP address for your server image isn't too important, but when you're configuring multi-server setups, it can be useful to duplicate a number of server images and give each a static IP address so you can consistently deploy to them. While not documented well at all, it turns out that this is relatively easy to accomplish in four simple steps.

1. Determine the MAC address of your guest machine

Let's say you have a guest machine with the name ubuntu-lucid-lynx-base a

@OldCrowEW
OldCrowEW / luks_on_lvm_arch_linux_guide.txt
Created September 16, 2018 01:45 — forked from ddnomad/luks_on_lvm_arch_linux_guide.sh
Arch Linux installation with a full-disk encryption (LUKS on LVM)
# This guide shows how to install Arch Linux with a full-disk encryption
# method called "LUKS on LVM" (powered by dm-crypt). It should work just
# fine for both a single physical disk (HDD/SSD) and a couple of them.
#
# The steps are verified to be valid as of 2018-09-15 and were composed
# according to the following sources:
# - https://wiki.archlinux.org/index.php/installation_guide
# - https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system
# - https://wiki.archlinux.org/index.php/Category:Boot_loaders
# - https://wiki.archlinux.org/index.php/Microcode
## tasks:
- name: Build hosts file
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{ item }}" state=present
when: hostvars[item].ansible_default_ipv4 is defined
with_items: "{{ groups['all'] }}"
- name: Add aliases for hosts excluded in playbook to hosts file
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[hostvars[item].ansible_host].ansible_default_ipv4.address }} {{ item }}" state=present
when: hostvars[item].ansible_default_ipv4 is not defined
with_items: "{{ groups['all'] }}"
@OldCrowEW
OldCrowEW / gist:68e461979841bf889da98a2a817f4af5
Created May 9, 2017 14:39
Reinstall All Current Jenkins Plugins
cd /var/lib/jenkins/plugins (or jenkins install dir)
for i in `ls -d */ | awk '{print substr($0, 1, length($0)-1)}'`; \
do java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080/ install-plugin $i; \
done
killall iTunes; killall "iTunes Helper"; sudo rm -rf /Applications/iTunes.app/