This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start-server | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
set -g status-keys vi | |
setw -g mode-keys vi | |
set -g status off | |
unbind ^L | |
bind ^L refresh-client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
def as_get_instances(client, asgroup, NextToken = None): | |
# this is downright ridiculous because boto3 sucks | |
irsp = None | |
if NextToken: | |
irsp = client.describe_auto_scaling_instances(MaxRecords=2, NextToken=NextToken) | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# setup python virtualenv and install nodeenv | |
virtualenv .python | |
. .python/bin/activate | |
pip install nodeenv | |
# setup nodeenv with the node of your choice, and upgrade npm to latest | |
nodeenv --node=0.10.37 --prebuilt .node | |
. .node/bin/activate | |
npm install -g npm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set_prompt() { | |
Last_Command=$? # Must come first! | |
Gray='\[\e[01;30m\]' | |
Blue='\[\e[01;34m\]' | |
White='\[\e[01;37m\]' | |
Purple='\[\e[0;35m\]' | |
Red='\[\e[01;31m\]' | |
Green='\[\e[01;32m\]' | |
Reset='\[\e[00m\]' | |
FancyX='\342\234\227' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import getpass | |
import hashlib | |
import os | |
from base64 import urlsafe_b64encode as encode | |
def make_secret(password): | |
salt=os.urandom(4) | |
sha = hashlib.sha1(password) | |
sha.update(salt) | |
digest_salt_b64 = '{}{}'.format(sha.digest(), salt).encode('base64').strip() |
NewerOlder