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 | |
VERSION="$1" | |
OWNER="${2:-sureshjoshi}" | |
echo "Updating all repos to use pants version $VERSION for owner $OWNER" | |
if [ -z "$VERSION" ]; then | |
echo "Please provide a version string as the first argument." | |
exit 1 | |
fi |
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
Test |
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
function pants_completions() | |
{ | |
# Get MD5 hash of pants.toml and create a reliable tmp directory with it | |
local -r PANTS_TOML_MD5=$(md5sum pants.toml | awk '{print $1}') | |
local -r PANTS_TMPFILE="$TMPDIR/pants_completion_$PANTS_TOML_MD5" | |
# Check if the cached Pants help JSON file exists, if not create it | |
if [ ! -f "$PANTS_TMPFILE" ]; then | |
cache_help_json "$PANTS_TMPFILE" |
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
### NOTE: This is strictly a breakdown of the snippets from the blog article, not an automated script. | |
### For automation, refer to the Ansible role | |
### Setup a Static IP | |
nano /etc/dhcpcd.conf | |
# Add these fields with your desired IP address | |
> interface eth0 | |
> static ip_address=10.10.10.1/24 | |
> static routers=10.10.10.0 |
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
#!/usr/bin/env python | |
import socket | |
import sys | |
if len(sys.argv) < 3: | |
print("Usage: wakeonlan.py <ADR> <MAC> (example: 192.168.1.255 00:11:22:33:44:55)") | |
sys.exit(1) | |
mac = sys.argv[2] |
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
name: Word crash | |
description: '' | |
host: WORD | |
api_set: {} | |
script: | |
content: |- | |
$("#run").click(() => tryCatch(run)); | |
$("#crash").click(() => tryCatch(crash)); | |
async function writeXml(context, xml) { |