This file contains 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
#!/usr/bin/env python | |
import time | |
import psutil | |
import os | |
import signal | |
This file contains 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
#!/bin/bash | |
# Add this locally to your repo as .git/hooks/pre-commit and make sure it is executable | |
# This does not actually get synced when you push to remote | |
docker build -t "hello_world" . && docker images hello_world && echo "Docker built properly" |
This file contains 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
# install cowsay and fortune | |
sudo apt-get install cowsay fortune | |
# install lolcat | |
sudo gem install lolcat | |
# be more wonderful | |
fortune |cowsay|lolcat |
This file contains 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
"logstash": { | |
"version": "1.4.4", | |
"server": { | |
"enabled": true, | |
"inputs": [ | |
{ | |
"rabbitmq": { | |
"exchange": "logstash", | |
"user": "username", | |
"password": "password", |
This file contains 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
# use this file to run chef locally on an opsworks instance | |
# You'll need to put it in /opt/aws/opsworks/current <-- it should contain a bin/ subdir | |
# to use it, find reasonable paths for substitution and call your recipe like this: | |
# bin/chef-solo -o <cookbook>::<recipe> -c test.rb -j /var/lib/aws/opsworks/chef/<date>.json -l info | |
# The next line is the only thing you really need in this file. The rest is documentation | |
cookbook_path ["/opt/aws/opsworks/current/merged-cookbooks"] |
This file contains 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
curl -LO https://raw.githubusercontent.com/alexlovelltroy/dotfiles/master/.screenrc | |
curl -LO https://raw.githubusercontent.com/alexlovelltroy/dotfiles/master/.gitconfig | |
curl -LO https://raw.githubusercontent.com/alexlovelltroy/dotfiles/master/.bash_profile | |
curl -L http://j.mp/spf13-vim3 -o - | sh | |
curl -L http://install.ohmyz.sh | sh |
This file contains 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
NODE="a hostname" | |
IFS=$'\n' | |
for line in $(curl -s 'localhost:9200/_cat/shards' | fgrep UNASSIGNED); do | |
INDEX=$(echo $line | (awk '{print $1}')) | |
SHARD=$(echo $line | (awk '{print $2}')) | |
curl -XPOST 'localhost:9200/_cluster/reroute?pretty' -d '{ | |
"commands": [ | |
{ | |
"allocate": { |
This file contains 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
# Graciously lifted from http://overloaded.io/timing-http-requests-curl | |
for i in {1..10};do curl -s -w @curl-format -o /dev/null "http://Www.pythian.com"; done |
This file contains 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
var http = require("http"); | |
var url = require("url"); | |
function start() { | |
function onRequest(request, response) { | |
var pathname = url.parse(request.url).pathname; | |
console.log("Request for " + pathname + " received."); | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.write("Hello World at " + pathname); |