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 | |
# modified from https://faq.i3wm.org/question/5312/how-to-toggle-onoff-external-and-internal-monitors.1.html | |
# this script will toggle which monitors are on. after booting, all monitors will be clones of the main laptop monitor. | |
# after each execution, we cycle through the following modes: | |
# - external monitor only (work mode) | |
# - external and laptop on but not clones (presentation mode) | |
# - laptop monitor only | |
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 | |
# After installing Ubuntu on a machine I run this script. It removes packages I don't use, | |
# improves the security situation slightly, and installs the minimal set of packages I need | |
# to do all my work. | |
# Usage: | |
# sudo chmod +x bootstrap.sh | |
# sudo ./bootstrap.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
[blank] | |
2001:4800:7816:0517:8b5b:f2a3:ff04:4f29 |
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
""" I did not write this, though I fixed a syntax error in it. I just found it while looking for an easy way to plot a world choropleth map. It is probably the worst program I've ever seen and felt I should keep it for some reason. """ | |
import shapefile | |
import matplotlib.cm as jimbo | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
from matplotlib.patches import Polygon | |
from matplotlib.collections import PatchCollection | |
import numpy as np |
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 | |
SECURE_MYSQL=$(expect -c " | |
set timeout 10 | |
spawn mysql_secure_installation | |
expect \"Enter current password for root (enter for none):\" | |
send \"\r\" |
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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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
from bottle import route, default_app | |
app = application = default_app() | |
app.mount("/api", app) | |
@route('/') | |
def index(): | |
return "Glorious success!" |
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
server { | |
listen 80; | |
server_name example.com | |
*.example.com; | |
root /srv/www/myapp; | |
location / { | |
index index.html; | |
} |
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
worker_processes 2; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
sendfile on; | |
keepalive_timeout 3; | |
gzip on; |
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
[uwsgi] | |
plugins=python33 | |
socket=/var/uwsgi/uwsgi.myapp.socket | |
pythonpath=/srv/www/myapp | |
uid = www-data | |
gid = www-data | |
chmod-socket = 777 | |
chown-socket = www-data:www-data |
NewerOlder