- Download & install Chrome
- Login & sync settings/whatever else
- General -> Use dark menu bar
- General -> Default web browser: Google Chrome
/* Exercise: Loops and Functions #43 */ | |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(2.) |
#printf | |
RUN printf '#!/bin/bash\n\ | |
echo hello world from line 1\n\ | |
echo hello world from line 2'\ | |
>> /tmp/hello | |
#echo | |
RUN echo -e '#!/bin/bash\n\ | |
echo hello world from line 1\n\ | |
echo hello world from line 2'\ |
set -u | |
set -e | |
#--------------------------------------------------------------------------- | |
# install the s3 utility for uploading / downloading content to s3 | |
#--------------------------------------------------------------------------- | |
cat <<EOF | sudo tee -a /etc/apt/sources.list | |
deb http://archive.mattho.com/ precise universe | |
EOF |
#!/usr/bin/env bash | |
HASH="$(git rev-parse --short HEAD)" | |
NAME="link-verifier" | |
VERSION="0.4" | |
DATE=$(date +%d-%m-%Y" "%H:%M:%S) | |
BUILD_DIR="build" | |
BUILD_TMP_DIR="$BUILD_DIR/tmp/$NAME-$VERSION" | |
BUILD_BIN_DIR="$BUILD_DIR/binaries" | |
BUILD_NIX_BIN_FILE="$BUILD_TMP_DIR/$NAME" |
#!/usr/bin/env bash | |
# | |
# delete-ami | |
# | |
# A script to deregister an Amazon Machine Image (AMI) and | |
# delete its corresponding root device snapshot. | |
# | |
##### Functions |
#!/bin/bash | |
# Retrieves image configuration using | |
# private registries without authentication | |
set -o errexit | |
# Address of the registry that we'll be | |
# performing the inspections against. | |
# This is necessary as the arguments we |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Description: > | |
Sample SAM Template using Application Auto Scaling + Provisioned Concurrency | |
Globals: | |
Function: | |
Timeout: 30 |
This script can help you find and remove unused AWS snapshots and volumes.
There is hardcoded list of regions that it searches, adjust the value to suit your needs.
Use snapshot.py snapshot-report
to generate report.csv
containing information about all snapshots.
snapshot.py snapshot-cleanup
lets you interactively delete snapshot if it finds it is referencing unexisting resources.
./snapshots.py --help