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
#!/usr/bin/env bash | |
RED='\033[0;31m' | |
LIGHTRED='\033[1;31m' | |
GREEN='\033[0;32m' | |
LIGHTGREEN='\033[1;32m' | |
BROWN='\033[0;33m' | |
YELLOW='\033[0;33m' | |
BLUE='\033[0;34m' | |
LIGHTBLUE='\033[1;34m' |
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 | |
if [[ ! -f /usr/local/bin/brew ]] | |
then | |
echo "Missing Homebrew. Will now install so that pyenv installation can continue..." | |
read -p "Press CTRL-C to cancel or Enter to continue..." | |
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew | |
fi | |
echo "Installing pyenv..." |
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 | |
set -e | |
echo "Installing required dependencies..." | |
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | |
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git | |
echo "Installing pyenv..." |
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
"""Demonstration of server-sent events with Tornado. To see the | |
stream, you can either point your browser to ``http://localhost:8080`` | |
or use ``curl`` like so:: | |
$ curl http://localhost:8080/events | |
""" | |
import signal | |
from tornado import web, gen |
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
""" | |
helloevolve.py implements a genetic algorithm that starts with a base | |
population of randomly generated strings, iterates over a certain number of | |
generations while implementing 'natural selection', and prints out the most fit | |
string. | |
The parameters of the simulation can be changed by modifying one of the many | |
global variables. To change the "most fit" string, modify OPTIMAL. POP_SIZE | |
controls the size of each generation, and GENERATIONS is the amount of | |
generations that the simulation will loop through before returning the fittest | |
string. |
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-option -g status-utf8 on | |
set-option -g status-justify left | |
set-option -g status-bg black | |
set-option -g status-fg white | |
set-option -g status-left-length 40 | |
set-option -g pane-active-border-fg green | |
set-option -g pane-active-border-bg black | |
set-option -g pane-border-fg white | |
set-option -g pane-border-bg black |
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-option -g status-utf8 on | |
set-option -g status-justify left | |
set-option -g status-bg black | |
set-option -g status-fg white | |
set-option -g status-left-length 40 | |
set-option -g pane-active-border-fg green | |
set-option -g pane-active-border-bg black | |
set-option -g pane-border-fg white | |
set-option -g pane-border-bg black |
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
sudo mount $1 /mnt | |
for i in /sys /proc /run /dev /dev/pts; do sudo mount --bind "$i" "/mnt$i"; done | |
sudo cp /etc/resolv.conf /mnt/etc/ | |
sudo chroot /mnt |
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
## SSH-Agent Manager | |
# Command list: | |
# sagent new - Generate new ssh-agent instance | |
# sagent [list] - List all ssh-agent instances along with keys they have loaded | |
# sagent <number> - Select ssh-agent instance based on number shown in sagent list | |
# sagent add </path/to/keyfile> - Add ssh key to currently selected ssh-agent | |
# sagent purgedead - Remove files related to dead ssh-agent instances | |
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/env python | |
import datetime | |
import paramiko | |
import re | |
import tempfile | |
def parse_args(): | |
import optparse | |
import sys |