# 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"`
#User Information gathering script developed by Raman Ksaitor ( raman.ksaitor at
#The script is designed primaraly for system administrators (and other root privelaged). The purpose is to gather most of system user information and save it in privatized files. Emphases is also put on easy and quick access to scripts parameters (by elemenating "choose forms", useless decorations, and by allowing pass parameters with a command line all-at-once).
#Script allows to deal with one single user (example with user "root": $ ./ -u root -niShfbsoH) or with a list of users (example with list of users "userlist": $ ./ -l "userlist -niShfbsoH")
#informational options:
# -n displays network and general information about user(s). Includes full login name, short name, home directory, shell, wether user is currently online or not, online idle time, current ip adress, first and last known login date, total online time.
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_
View Preferences.sublime-settings
"color_scheme": "Packages/Obsidian Color Scheme/Obsidian.tmTheme",
"default_line_ending": "unix",
"fade_fold_buttons": true,
"font_size": 13.0,
"highlight_line": true,
"find_selected_text": true,
"match_brackets_angle": true,
"ensure_newline_at_eof_on_save": true,
View gist:5726034
perl -pi -e 's/\r\n/\n/g' input.file
# 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\]"
View objectInArray
function has(arr, obj){
for (var i = 0; i < arr.length; i++) {
if (arr[i] == obj) return true;