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 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
View lambda_echobot.py
"""
Slack chat-bot Lambda handler.
"""
import os
import logging
import urllib
# Grab the Bot OAuth token from the environment.
BOT_TOKEN = os.environ["BOT_TOKEN"]
@tamsky
tamsky / readme.md
Last active Feb 5, 2019
notes on slowing down video+audio using ffmpeg
View readme.md

I noticed that simply using

i=0.7 && ffmpeg -i delay1.mp4 -filter:a "atempo=$i" -vf "setpts=(PTS-STARTPTS)/$i" output-$i.mp4

always had a significant a/v sync issue.

I tried jogging the source first:

ffmpeg -i input.mp4 -itsoffset 0.3 -i input.mp4 -vcodec copy -acodec copy -map 0:1 -map 1:0 delay1.mp4

You can’t perform that action at this time.