Skip to content

Instantly share code, notes, and snippets.

@shaon
shaon / tmux.md
Created July 25, 2019 06:10 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

Keybase proof

I hereby claim:

  • I am shaon on github.
  • I am iamshaon (https://keybase.io/iamshaon) on keybase.
  • I have a public key ASBLbA7iOFgUvGn2CLgunTfMrbTuJas42jIiZVfS2WUf7Ao

To claim this, I am signing this object:

#!/bin/bash
# This is an updated version of the aws-install-ssm-agent
# script that supports SUSE.
function die() {
echo "$@, exiting." >&2
exit 1
}
{
"schemaVersion":"0.3",
"description":"Updates AMI with Linux distribution packages and Amazon software. For details,see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sysman-ami-walkthrough.html",
"assumeRole":"{{AutomationAssumeRole}}",
"parameters":{
"SourceAmiId":{
"type":"String",
"description":"(Required) The source Amazon Machine Image ID."
},
"InstanceIamRole":{
#!/bin/bash
# This is an updated version of the aws-update-linux-instance
# script that supports SUSE.
PRE_UPDATE_SCRIPT_URL=''
POST_UPDATE_SCRIPT_URL=''
INCLUDE_PACKAGES=''
EXCLUDE_PACKAGES=''
#!/bin/bash
function get_contents() {
if [ -x "$(which curl)" ]; then
curl -s -f "$1"
elif [ -x "$(which wget)" ]; then
wget "$1" -O -
else
die "No download utility (curl, wget)"
fi
#!/bin/bash
# This is an updated version of the aws-install-ssm-agent
# script that supports SUSE.
function die() {
echo "$@, exiting." >&2
exit 1
}
@shaon
shaon / reinvent-2017-youtube.md
Created December 7, 2017 16:26 — forked from stevenringo/reinvent-2017-youtube.md
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

#!/bin/bash
echo "zone euca.example.net" > /tmp/dnsupdate
echo "server 10.17.198.5" >> /tmp/dnsupdate
echo "update delete `hostname`" >> /tmp/dnsupdate
echo "update add `hostname` 86400 A `hostname -I`" >> /tmp/dnsupdate
echo "debug yes" >> /tmp/dnsupdate
echo "send" >> /tmp/dnsupdate
/usr/bin/nsupdate -v /tmp/dnsupdate
;; filepath: /var/named/fwd.euca.example.net
$ORIGIN .
$TTL 86400 ; 1 day
euca.example.net IN SOA aoe-08-5.euca.example.net. root.euca.example.net. (
2011071306 ; serial
3600 ; refresh (1 hour)
1800 ; retry (30 minutes)
604800 ; expire (1 week)
86400 ; minimum (1 day)