Skip to content

Instantly share code, notes, and snippets.

Marc Tamsky tamsky

Block or report user

Report or block tamsky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Dockerfile-failing-ssh-agent-test
FROM ubuntu
RUN apt-get update && apt-get install -y openssh-client
RUN ssh-add -l 2>&1 | tee -a /tmp/ssh-agent.out || true
RUN cat /tmp/ssh-agent.out
@tamsky
tamsky / apt-rdepends-tree
Created Sep 30, 2019 — forked from damphat/apt-rdepends-tree
debian dependency tree
View apt-rdepends-tree
#! /bin/bash
# Description: show dependency tree
# Author: damphat
if [ $# != 1 ]; then
echo 'Usage: apt-rdepends-tree <package>'
echo 'Required packages: apt-rdepends'
exit 1
fi
View README-autossh-systemd.txt
1) ==== Autossh using systemd ====
Example from
https://gist.github.com/drmalex07/c0f9304deea566842490
2) =============
Install autossh
View gist:ad0793d5b0e149597732b4d25c3ea9ec
SRE and DevOps share similar foundational principles;
SRE could be seen as a refined implementation of DevOps,
although SRE existed before the coinage of the term DevOps.
SRE contains ownership, oversight and responsibilities that differ from DevOps.
@tamsky
tamsky / gist:fec898d753d6eb84713ac1683867a3bd
Last active Apr 23, 2019
an HA design for prometheus pushgateway
View gist:fec898d753d6eb84713ac1683867a3bd
pushgateway clients (eg: lambda functions) push to api-gateway.
api gateway invokes a lambda "receiver" function which
- reads pushgateway event, and writes that event data to SNS
(decoupled event queue is implemented via SNS)
a lambda reader that triggers based on SNS queue depth
- writes SNS events to dynamodb (TTL optional)
@tamsky
tamsky / gist:3014acc474448121e5974d3a6f19877b
Last active Apr 15, 2019
# docker run -it --rm --entrypoint bash amazon/aws-codebuild-local
View gist:3014acc474448121e5974d3a6f19877b
# yum makecache fast ; yum install -y less file binutils
Apr 15 20:24:14 Updated: file-libs-5.34-3.37.amzn1.x86_64
Apr 15 20:24:14 Installed: file-5.34-3.37.amzn1.x86_64
Apr 15 20:26:33 Installed: binutils-2.25.1-31.base.66.amzn1.x86_64
@tamsky
tamsky / gist:851a3ea3e153d1d6421b70320587c7c3
Created Apr 15, 2019
# docker run -it --rm --entrypoint bash amazon/aws-codebuild-local
View gist:851a3ea3e153d1d6421b70320587c7c3
Apr 15 20:24:14 Updated: file-libs-5.34-3.37.amzn1.x86_64
Apr 15 20:24:14 Installed: file-5.34-3.37.amzn1.x86_64
Apr 15 20:26:33 Installed: binutils-2.25.1-31.base.66.amzn1.x86_64
@tamsky
tamsky / example.sh
Last active Apr 13, 2019
bash hint for executing $0
View example.sh
( cd ${dest_path} && $0 )
vs
( cd ${dest_path} && $(realpath "${BASH_SOURCE[0]}") )
View terraform.tf
# Set the backend
terraform {
backend "s3" {
encrypt = true
}
}
# Get most recent AMI_ID for base
data "aws_ami" "base_ami" {
most_recent = true
View user_data.sh
##
## Makefile help
##
cat <<"__EOF__" > /usr/local/include/Makefile.help
# Ensures that a variable is defined
define assert-set
@[ -n "$($1)" ] || (echo "$(1) not defined in $(@)"; exit 1)
endef
default:: help
.PHONY : help
You can’t perform that action at this time.