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/bash | |
aws route53 list-hosted-zones | jq -c '.HostedZones | .[]' | while read i; do | |
name=$(echo $i | jq -r .Name) | |
id=$(echo $i | jq -r .Id) | |
aws route53 list-resource-record-sets --hosted-zone-id "${id}" | jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?] | @csv' > "${name//./_}DNS_Zone.csv" | |
done |
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/bash | |
# use this to run composer commands in a container (rather than on the host machine) | |
# to execute: | |
# ./composer-command.sh {{ composer commands }} | |
# the {{ composer commands }} above get passed to composer for execution (eg: "install") | |
# | |
# ./composer-command.sh install --dev | |
# | |
# Install Laravel (run this from a parent directory) |
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
if (!Date.prototype.toRFC3339String) { | |
(function () { | |
function pad(number) { | |
if (number < 10) { | |
return '0' + number; | |
} | |
return number; | |
} |
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
/** | |
* Get Dom Element with Regex - matches regular expression against the attribute value. | |
* | |
* @param regex Regex The regular expression to match the attribute value on | |
* @param selectorStr String An optional string to further refine the initial selector (used in the querySeelctorAll) - @default * | |
* | |
* @return array of objects containing the element, the attriube name and value OR null if none are matched. | |
*/ | |
function getDomElementWithRegex(regex, selectorStr) { | |
if(!regex) return null; |
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/bash | |
RED='\033[0;31m' | |
YELLOW='\033[1;33m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
echo | |
echo | |
echo -e "${GREEN}╭──────────────────────────────────────────────────────────────╮${NC}" |
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/bash | |
RED='\033[0;31m' | |
YELLOW='\033[1;33m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' # No Color | |
echo | |
echo | |
echo -e "${GREEN}╭──────────────────────────────────────────────────────────────────────╮${NC}" |
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/bash | |
bq show --format=prettyjson bigquery-public-data:github_repos.commits | jq '.schema.fields' > github-commits-schema.json |
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/bash | |
# VARS | |
PROJECT=my-project | |
DATASET_NAME=Datisan_TEST | |
# tables will have the structure day_tables_prefix_yyyyMMdd (sharded daily tables) | |
TABLE_PREFIX=day_tables_prefix | |
# make sure we are on the right project |
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
// Iterates all of the dimensions in the edit dimensions list in Google Analytics (only accounts for users with edit rights) & outputs the list, MINUS the dimension number | |
let list = document.querySelectorAll('.ID-editDimension > a'); | |
list.forEach((value,key) => { let r = /(?:\d+\. )?(.*)/i; let b = r.exec(value.text); if(b) console.log(b && b[1]) }); |
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
sudo apt-get -y install php7.2 php7.2-dev php7.2-mysql php-apcu php7.2-gd php7.0-mcrypt php-memcache php7.2-curl php7.2-tidy php-xml php-json php7.2-mbstring php-gettext libmcrypt-dev mcrypt php-gd libmcrypt4 libmhash2 libtidy5 libxslt1.1 php-apcu-bc php-pear php7.2-mbstring php7.2-xml php7.2-fpm php7.2 php-mongodb | |
# remove apache | |
update-rc.d -f apache2 remove | |
apt-get remove apache2 | |
sudo update-rc.d -f php7.2-fpm default | |
sudo service php7.2-fpm restart |
NewerOlder