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

@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

#!/usr/bin/env bash
# set -x
# DEBUG='echo'
device=$1
[ ! -f "${device}" ] && exit 1
output_dir=$( echo "${device}" | sed 's/.img//g' )
[ -d "${output_dir}" ] && exit 1
mkdir -p "${output_dir}"
!/usr/bin/env bash
# set -x
get_next_multiplier() {
current_multiplier=$1
multiplier=$(( ${current_multiplier} * 2 ))
}
set_variables() {
attach_volume () {
volId=$1
grep vd[a-z]$ /proc/partitions | awk "{print \$4;}" > /tmp/before
sleep 2
# attach the volume
echo "Attaching $volId to $instanceId"
euca-attach-volume -i $instanceId $volId -d /dev/vdc
#!/bin/bash
export PASSWORD=yourpassword
export HOSTNAME='scalr'
export DOMAIN='.local'
export SCALR_BASE=/usr/local/scalr
export SCALR_HOME=$SCALR_BASE/scalr-home
export SCALR_FILES=$SCALR_BASE/scalr-files
export CURRENT=$SCALR_BASE/current
euare-accountcreate -a ui-test-acct-00
euare-useraddloginprofile --delegate ui-test-acct-00 -u admin -p mypassword0
euare-useraddkey --delegate ui-test-acct-00 -u admin
euare-usercreate --delegate ui-test-acct-00 -u user00
euare-useraddloginprofile --delegate ui-test-acct-00 -u user00 -p mypassword1
euare-useraddkey --delegate ui-test-acct-00 -u user00
euare-accountcreate -a ui-test-acct-01
euare-useraddloginprofile --delegate ui-test-acct-01 -u admin -p mypassword2
euare-useraddkey --delegate ui-test-acct-01 -u admin
euare-usercreate --delegate ui-test-acct-01 -u user00
@shaon
shaon / update_catalog.py
Created November 19, 2012 08:47 — forked from dkavanagh/update_catalog.py
Tool for updating eustore catalog based on signature calculated from tarballs
#!/usr/bin/env python
import os
import sys
import urllib2
import json
import hashlib
import zlib
from optparse import OptionParser