Code Monkey home page Code Monkey logo

dotfiles's Introduction

dotfiles

My dotfiles! Not just configuration, but also useful scripts.

home

Contains files to be put into home.

.config

Various config files

fish

Files for the Fish shell

config.fish

Equivalent to bashrc. Just has a few path variables.

functions

Fish functions.

fish_prompt.sh

The typical fish_prompt, but with a prompt to add Terraform workspace if in a Terraform workspace.

slackme

A function to send myself a Slack message. Usually useful for chaining on the end of a long running process.

.i3

Contains files for i3wm

bin

Contains useful scripts.

csvToProxySQLRules.pl

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.

db_dump.sh

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.

display-switch.sh

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

docker-debug-service

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

mysqlASCIITableToCSV.pl

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.

shasum

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.

updateCnameHosts.pl

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.

Syntax

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

Usage

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

watchrng.py

Grabbed from somewhere else, outputs total entropy bits in a loop to watch for entropy drops or gains.

yarn-flat-auto

Grabbed from somewhere else, picks the highest version of every module automatically on a yarn --flat dependency resolution run.

node

Files to use with Node.

.eslintrc.js

Based on standard config, enforcing a few rules I like as well as using tabs instead of spaces.

yarn_eslint.sh

A line to run to install all the plugins necessary for the config above.

dotfiles's People

Contributors

tprobinson avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.