- Piece together a server monitoring tool.
- Build a new, ansible-driven deploy process.
- Open-source and properly version all of our shared code.
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
| function tabname { | |
| if [ -z "$1" ]; | |
| then | |
| TABNAME="${PWD##*/}"; | |
| else | |
| TABNAME="$1"; | |
| fi | |
| printf "\e]1;$TABNAME\a" | |
| } |
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 sys | |
| import math | |
| from PIL import Image, ImageDraw | |
| def get_line(center, angle, length): | |
| y_diff = math.sin(angle) * length / 3 | |
| x_diff = math.cos(angle) * length / 3 | |
| start = (center[0] + x_diff, center[1] + y_diff) |
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
| #!/bin/sh | |
| wget -O /tmp/onion-devel.sql.bz2 http://192.168.1.26/onion/onion.sql.bz2 | |
| export PGPASSWORD=testonion | |
| psql -d postgres -h 127.0.0.1 -U onion -c "DROP DATABASE onion" | |
| psql -d postgres -h 127.0.0.1 -U onion -c "CREATE DATABASE onion" | |
| bunzip2 /tmp/onion-devel.sql.bz2 |
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
| def application(env, start_response): | |
| start_response("200 OK", [("Content-Type", "text/html")]) | |
| return """<!doctype html> | |
| <html> | |
| <title>Welcome to zylch!</title> | |
| <body> | |
| </body> | |
| </html>""" |
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
| #!/bin/bash | |
| curl http://127.0.0.1:9200/_aliases 2>/dev/null | \ | |
| python -c "import json;import sys;sys.stdout.write('\n'.join([key for key in json.load(sys.stdin).keys() if key.startswith('logstash')]))" | \ | |
| sort -r | tail -n +20 | xargs -L 1 -I {} curl -XDELETE http://127.0.0.1:9200/{}/ |
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
| function throwaway { | |
| THROWAWAY_DIR=$(mktemp -d -t virtualenv); | |
| cd $THROWAWAY_DIR; | |
| virtualenv .; | |
| source bin/activate; | |
| trap "rm -r $THROWAWAY_DIR" EXIT | |
| } | |
| export -f throwaway |
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
| <html><head><meta http-equiv="refresh" content="0; URL='http://73972.api-04.com/serve?action=click&publisher_id=73972&site_id=54804&offer_id=289864&ref_id=206773_53b70cee9990b_14070422&mac_address=&odin=&ios_ifa=&sub_publisher=206773&sub_site=106933&sub_campaign=2156&sub_adgroup=5683&sub_ad='"></head><body></body></html> |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Encoding...</title> | |
| <style> | |
| body { | |
| margin: 0; | |
| padding: 0; | |
| background-color: #333; |
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
| function throwaway { | |
| THROWAWAY_DIR=$(mktemp -d -t virtualenv); | |
| cd $THROWAWAY_DIR; | |
| virtualenv .; | |
| source bin/activate; | |
| trap "rm -r $THROWAWAY_DIR" EXIT | |
| } | |
| export -f throwaway |