Configure the VPN not to be the default route (Untick "Use default gateway on remote network", buried way down in the adapter TCP settings), otherwise this is a bit pointless.
Set up scheduled tasks triggered on 'an event':
#!/usr/bin/ruby | |
unsurprising = "## master...origin/master" | |
check = "git status --porcelain -b" | |
show = "git status -sb" | |
system show unless `#{check}`.strip == unsurprising |
#!/usr/bin/env ruby | |
require 'pp' | |
require 'json' | |
require 'fileutils' | |
require 'set' | |
# Filter for specific Route 53 hosted zones | |
# |
# Fix word-break characters | |
defaults write .GlobalPreferences AppleTextBreakLocale en_US_POSIX | |
# Apply user's Dvorak layout settings to the startup login screen | |
sudo mv /Library/Preferences/com.apple.HIToolbox.plist{,.old} | |
sudo cp {$HOME,}/Library/Preferences/com.apple.HIToolbox.plist | |
sudo chown root:wheel /Library/Preferences/com.apple.HIToolbox.plist | |
sudo chmod 644 /Library/Preferences/com.apple.HIToolbox.plist |
In Terraform you might want to replace ingress
/egress
rules directly on an aws_security_group
with individual aws_security_group_rule
s, so that they work properly.
To do this, first make the required *.tf
changes. Great. Now the plan contains only rule additions, and application fails due to the collision with the undeleted old rules.
terraform state rm aws_security_group.the_sg
terraform import aws_security_group.the_sg sg-deadbeef
Great. Now it's imported a bunch of aws_security_group_rule
s called aws_security_group_rule.the_sg
and aws_security_group_rule.the_sg-1
up to -whatever
, rather than the aws_security_group_rule.descriptive_name
you wanted.
I hereby claim:
To claim this, I am signing this object:
This is a Pysh script based on an 'idealized' partial re-implementation of my uta utility. | |
Pysh will basically be a language (or set of ugly macros) for quickly hacking shell-scripty tasks in Python. | |
Theoretically you get the luxury of Python idioms like generators, context managers, and meaningful whitespace, with the flexibility to hurl data between other programs in various convenient ways that don't involve Popen. | |
All the best languages have quirky special characters, right? (It's not like Perl, I promise.) |
#!/bin/zsh -eu | |
set -o pipefail | |
# Main directory full of Git repos | |
GIT_DIRECTORY=~/work/git | |
# Branches to ensure (if they exist) are checked out and constantly updated from origin. | |
# Anything weird I'm doing that could fail to rebase should be in a nicely separated branch / worktree anyway! | |
# TODO replace this fixed list with pattern filter on remote branches | |
CANONICAL_SYNC_BRANCHES=(master develop v2.{2..9}) |
var t = document.querySelector('.GEHJJTKDEAB table tbody'); var l=[]; for(let c of t.children){ l.push(c); } l.sort((a,b)=>{ let ta=a.children[1].innerText.split('.').reverse().join('.');let tb=b.children[1].innerText.split('.').reverse().join('.'); return (ta==tb)?0:(ta>tb)?1:-1}); t.innerHTML=''; l.forEach((c)=>{t.appendChild(c);}); |