Skip to content

Instantly share code, notes, and snippets.

# herein we backup our indexes! this script should run at like 6pm or something, after logstash
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas,
# compress the data files, create a restore script, and push it all up to S3.
TODAY=`date +"%Y.%m.%d"`
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put"
YEARMONTH=`date +"%Y-%m"`
View .chef_profile
alias kb="knife bootstrap"
# alias k="knife bootstrap windows ssh FQDN
# alias k="knife bootstrap windows winrm FQDN
alias kbdc="knife client bulk delete"
alias kcc="knife client create --editor /usr/bin/sublime"
alias kdc="knife client delete"
alias kec="knife client edit"
View gist:8930315
Tricks to add encrypted private SSH key to .travis.yml file
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here:
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)"
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_
ksaitor /
Created Nov 2, 2012 — forked from mnem/
Prettifies bash terminals with git
# Setup the prompt so that it shows the current branch when in a git directory.
source /usr/local/etc/bash_completion.d/git-completion.bash
source /usr/local/etc/bash_completion.d/
function setup_prompts_for_git
local BLUE="\[\e[0;34m\]"
local RED="\[\e[0;31m\]"
local YELLOW="\[\e[0;33m\]"
local PURPLE="\[\e[0;35m\]"
local CLR_RESET="\[\e[0m\]"