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 | |
# This queries AWS for the *latest* AMI images per global region, writes them to a file, and then reads that file back to us. | |
for REGION in $(aws ec2 describe-regions --query "Regions[].RegionName" --output json | jq -r '.[]'); | |
do | |
echo "$region = $(aws ec2 describe-images --owners amazon \ | |
--filters 'Name=name,Values=amzn-ami-hvm-????.??.?.x86_64-gp2'\ | |
--query 'sort_by(Images, &CreationDate) | [-1].ImageId' --region $REGION)"; | |
done > ~/aws-latest-images-per-region.txt |
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
# Generate yaml file. | |
echo -e "# http://yaml.org/spec/\n---\nYAML SPEC RELEASES: DATE\n - Release 1.0: 2004-01-29\n\ | |
- Release 1.1: 2004-12-30 \n - Release 1.2: 2009-09-29\n—--" > yaml-spec-releases-and-dates.yml | |
cat yaml-spec-releases-and-dates.yml | shyaml -y | |
cat > known-good-yaml.yml <<EOF | |
--- | |
invoice: 34843 | |
date : 2001-01-23 |
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
import React, { Component } from 'react'; | |
import 'bootstrap/dist/css/bootstrap.css'; | |
import { Collapse, Button, CardBody, Card } from 'reactstrap'; | |
// import './html5-styles.css' | |
// import logo from './TE-logo.svg' | |
class Accordion extends Component { | |
constructor(props) { | |
super(props); |
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
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import 'bootstrap/dist/css/bootstrap.css'; | |
import { | |
Carousel, | |
CarouselItem, | |
CarouselControl, |
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
/* | |
There is a failed react test which is most pressing: | |
- /hello/conehead => Responds correctly with "Hello conehead." SUCCESS :) | |
- ** 404 page rediects work fine as a general rule, but the next item is an exception to that good rule..** | |
- /hello/cone/head? => Fails as desired, but does NOT get redirected to 404 page. :( | |
Since I am using react router 4 <Routes>...<Switch>...</Switch> </Routes>, | |
I believe that I need to extract location params, but that is clearly failing. |
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
/* | |
See related gist first: Related gist: https://gist.github.com/jeremy-donson/d9eae766cd90591015e1955d1162e30c | |
There is a counter to track names used ( /name/Bilbo ) while React page state is maintained. | |
The idea is to go to /counts url and see displayed collected stats on the occurrences of /hello/:name | |
Sample data structure: |
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
for n in $(pip3 list --outdated --format=freeze | cut -d '=' -f 1) | |
do | |
pip3 install $n --upgrade --force | |
done | |
# Ideally we would be testing each upgrade before we delete prior versions!! | |
# for those that fail, rerun with: | |
sudo -H pip3 install $n --upgrade --force |
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
$ pip3 install pyyaml | |
$ python3 | |
>>> import yaml | |
>>> yaml.load(""" | |
... - Hdf | |
... - Jgd | |
... - Kjhgd | |
... """) | |
['Hdf', 'Jgd', 'Kjhgd'] | |
>>> dat = yaml.load(""" |
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
- [x] Create a gist to track my 2do's. | |
- [x] List all tasks as GHMD 'to do items'. | |
- [x] Create repo for working with DonG + team. | |
- [*] Complete sexual harassment training. | |
- [*] Review, follow and document ( https://nmfco.sharepoint.com/sites/ips-modernization/Shared%20Documents/Forms/AllItems.aspx?id=%2Fsites%2Fips%2Dmodernization%2FShared%20Documents%2F3%2E%20Program%20Communications%2F5%2E%20Presentations) | |
=> DevOps KT Session 1 - Key Mgmt.aspx | |
- [*] Watch intro 2 hour video. | |
- [*] Await vault access group sync to cloud. | |
- [*] Complete New Hire Onboarding Process | |
- [*] Script setup of percona-server 5.7.x docker image on EC2 host. |
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 | |
# install percona-server (8.0.x) on OSX | |
brew install percona-server | |
mysql.server start | |
mysql -uroot -e 'SELECT VERSION()' | |
mysql.server stop | |
brew unlink percona-server | |
mv /usr/local/var/mysql /usr/local/var/mysql8 |
OlderNewer