This file contains hidden or 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/bash | |
declare -A nato | |
nato[A]=Alpha | |
nato[B]=Bravo | |
nato[C]=Charlie | |
nato[D]=Delta | |
nato[E]=Echo | |
nato[F]=Foxtrot | |
nato[G]=Golf | |
nato[H]=Hotel |
This file contains hidden or 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/bash | |
TMP="/tmp" | |
DB_USER="root" | |
DB_PASSWD="password" | |
SITES_DIR="/var/www" | |
S3_BUCKET="s3://bucket-name" | |
DATE=$(date +%Y-%m-%d) | |
# Backup all databases to S3 | |
for DB in $(mysql --user=$DB_USER --password=$DB_PASSWD -e 'show databases' -s --skip-column-names|grep -Ev "^(information_schema|performance_schema|mysql)$"); |
This file contains hidden or 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
> cat ~/proxies_off | |
#!/bin/sh | |
echo "Proxies OFF" | |
unset HTTP_PROXY | |
unset ALL_PROXY | |
unset http_proxy | |
unset HTTPS_PROXY | |
unset https_proxy |
This file contains hidden or 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
/* | |
* Add X-Request-Start header so we can track queue times in New Relic RPM beginning at Varnish. | |
* | |
*/ | |
#include <sys/time.h> | |
struct timeval detail_time; | |
gettimeofday(&detail_time,NULL); | |
char start[20]; |
This file contains hidden or 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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |