My dotfiles! Not just configuration, but also useful scripts.
Contains files to be put into home.
Various config files
Files for the Fish shell
Equivalent to bashrc. Just has a few path variables.
Fish functions.
The typical fish_prompt, but with a prompt to add Terraform workspace if in a Terraform workspace.
A function to send myself a Slack message. Usually useful for chaining on the end of a long running process.
Contains files for i3wm
Contains useful scripts.
Converts a CSV file into a ProxySQL rules insert statement. This allows rules to be stored externally as a flat database while making reconfiguring a broken proxy easy.
A script to make copying MySQL compatible databases from one server to another easier. Edit the variables at the top of the script to provide sort of a listing of possible databases. For example, in the script here, "PROD" and "STAGE" are possible options.
Then, edit the FROM and TO variables to use those prefixes.
Edit the BACKUP_FROM and BACKUP_TO variables to automatically backup the target databases before dumping FROM into TO.
Probably not directly useful for anyone but me on a particular setup, but could be a good scaffold for someone else to use. Upon being triggered, will switch laptop between docked and undocked monitor configs.
Referenced in [/home/.i3/config] as Shift+Ctrl+Alt+Mod4+F1
A script to debug a Docker Swarm service by producing a "docker run" line from its service definition. Only the last arg is used for the service name.
Can be invoked using Docker args:
docker-debug-service -H myswarm.docker.local myservice
I hope you don't ever have to use this. It converts a text file containing an ASCII table as output by MySQL, into a CSV. Usually used for pasted terminal output. Eugh.
A modified version of the Linux builtin shasum utility, with new flags:
Flag | Description |
---|---|
-r | Outputs a raw digest (binary) |
-B | Outputs a base64 digest |
This has been primarily used with Terraform, since it uses base64 digests.
This script "enhances" the /etc/hosts
file to support CNAMES. Kind of.
Rough state, can leave extra entries if edits are made by hand.
Useful for working around temporary crappy DNS or mocking up future DNS names. Won't remove any entries you've made in the hosts file.
Upon run, this script will create an entry with the first IP returned by that DNS name, mapped to all aliases. If the IP changes, the line will be updated.
Create a comment in the hosts file like the below:
# CNAME <dns name> <aliases>
# ex:
# CNAME mydns.alias internal.prod internal.stage
1.1.1.1 internal.prod internal.stage
To run as your own user, set the /etc/hosts
file to be your group:
chgrp `whoami` /etc/hosts
Run on a crontab like this:
*/5 * * * * perl ~/bin/updateCnameHosts.pl
Grabbed from somewhere else, outputs total entropy bits in a loop to watch for entropy drops or gains.
Grabbed from somewhere else, picks the highest version of every module automatically on a yarn --flat dependency resolution run.
Files to use with Node.
Based on standard config, enforcing a few rules I like as well as using tabs instead of spaces.
A line to run to install all the plugins necessary for the config above.