Skip to content

Instantly share code, notes, and snippets.

View DownRangeDevOps's full-sized avatar

Ryan Fisher DownRangeDevOps

View GitHub Profile
@DownRangeDevOps
DownRangeDevOps / docker-compose.yml
Created June 27, 2018 17:54 — forked from seanhandley/docker-compose.yml
How To Set Up Docker For Mac with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@DownRangeDevOps
DownRangeDevOps / 0-startup-overview.md
Created May 9, 2018 21:59 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@DownRangeDevOps
DownRangeDevOps / ansible-summary.md
Created August 12, 2017 21:44 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@DownRangeDevOps
DownRangeDevOps / 0_reuse_code.js
Created December 24, 2016 07:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Wrestling with Python on OS X (Yosemite)

Source: [Wrestling with python on OSX Yosemite][1]

Mar 1, 2015 By zachmccormick

So I have been using my Macbook Pro for about 3 years for various projects, mostly in Java/Android, some Node here and there, I’ve installed Ruby and RVM for whatever reason once or twice, and I probably have 8 version of Python installed. I started to work on an open source Python project that

@DownRangeDevOps
DownRangeDevOps / useful_random_stuff.sh
Last active April 6, 2018 01:37
Commands I usually forget until I need them
# AWS CLI
ec2 describe-instances
--filters "Name=tag:Environment,Values=staging" "Name=tag:Group,Values=wizard" \
--query "Reservations[].Instances[].{Environment: Tags[?Key == 'Environment'].Value | [0], \
Name: Tags[?Key == 'Name'].Value | [0], \
ip: PrivateIpAddress}" --output table
sudo ntpdate pool.ntp.org #update system time
ssh-keygen -R hostname #remove a host from authorized_keys
@DownRangeDevOps
DownRangeDevOps / sequel_pro.sh
Created June 10, 2015 03:26
Sequel Pro Connection Command #UNIX
#!/bin/sh
Used command: /usr/bin/ssh -v -N -o ControlMaster=no -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o NumberOfPasswordPrompts=3 -i /Users/<home>/.ssh/prod_rsa -o TCPKeepAlive=no -o ServerAliveInterval=60 -o ServerAliveCountMax=1 user@prod -L 56280/dbhost/3306
@DownRangeDevOps
DownRangeDevOps / mysql_get_all_table_size.sql
Created June 5, 2015 08:10
Get the size of all tables in a MySQL DB #MYSQL
SELECT table_name AS "Tables",
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "$DB_NAME"
ORDER BY (data_length + index_length) DESC;
-- Input
-- www.example.com
-- example.com
-- .example.com
UPDATE domains
SET name = trim(REPLACE(concat(" ",name," "),'www.',''))
-- Output
-- example.com
// Remove the ^$ to match all domains in a string
^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$