Note: I'm currently taking a break from this course to focus on my studies so I can finally graduate
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
version: '2' | |
services: | |
api: | |
volumes: | |
- "nfsmount:${CONTAINER_DIR}" | |
volumes: | |
nfsmount: | |
driver: local | |
driver_opts: |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
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
# 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 |
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/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 |
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
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; |
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
-- Input | |
-- www.example.com | |
-- example.com | |
-- .example.com | |
UPDATE domains | |
SET name = trim(REPLACE(concat(" ",name," "),'www.','')) | |
-- Output | |
-- example.com |
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
// 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}$ |
NewerOlder