apt-get install libconfig-general-perl libregexp-common-perl collectd collectd-utils lm-sensors \
libcgi-fast-perl librrds-perl libhtml-parser-perl libjson-perl fcgiwrap nginx
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 | |
# To audit, I tried the bash script here https://gist.github.com/aastaneh/46ceb03150e5284b8a3a but it didn't work, | |
# so here's my version. It doesn't attempt to check internal ELBs (prefixed with 'internal'). | |
for ELB in $( aws elb describe-load-balancers | grep DNSName | awk '{ print $2 }' | perl -ne 'chomp; $_ =~ /\"([\w-\.]+)\",/; my $elb = $1; print "$elb " unless $elb =~ /^internal/'); do | |
echo "$ELB "; | |
echo "01 logout" | openssl s_client -ssl3 -connect $ELB:443 2>&1 | grep DONE &> /dev/null | |
if [[ "$?" -ne "1" ]]; then | |
echo FAIL | |
else |
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
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
# Change example.com (server_name) to your website url | |
# Change /path/to/your/root to the correct value | |
server { | |
listen 80; | |
server_name example.com; | |
root /path/to/your/root; | |
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
proxy_cache_path /var/lib/nginx/cache/staticfiles levels=1:2 keys_zone=staticfilecache:10m max_size=50m; | |
proxy_cache_path /var/lib/nginx/cache/php levels=2:2 keys_zone=php:10m inactive=20m max_size=50m; | |
proxy_temp_path /var/lib/nginx/proxy; | |
proxy_connect_timeout 30; | |
proxy_read_timeout 120; | |
proxy_send_timeout 120; | |
#IMPORTANT - this sets the basic cache key that's used in the static file cache. | |
proxy_cache_key "$scheme://$host$request_uri"; |
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/local/Cellar/ruby/2.1.5/bin/ruby | |
# | |
# | |
require 'fileutils' | |
base_dir = ARGV[0] | |
target_dir = ARGV[1] | |
movies = Dir.glob([base_dir, '**','*.mov'].join('/')) |
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/python | |
import json | |
import subprocess | |
blockdev_fullpath_macro = "{#BLOCKDEV_FULLPATH}" | |
blockdev_type_macro = "{#BLOCKDEV_TYPE}" | |
blockdev_shortname_macro = "{#BLOCKDEV_SHORTNAME}" |
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
{ | |
"fio version" : "fio-2.2.10", | |
"timestamp" : 1458066508, | |
"time" : "Tue Mar 15 14:28:28 2016", | |
"jobs" : [ | |
{ | |
"jobname" : "imac", | |
"groupid" : 0, | |
"error" : 0, | |
"eta" : 0, |
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
logLevel = "DEBUG" | |
traefiklogsfile = "traefik.log" | |
accesslogsfile = "access.log" | |
defaultEntryPoints = ["http"] | |
[web] | |
address = ":8088" | |
[entryPoints] | |
[entryPoints.http] |
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
import SimpleHTTPServer | |
import SocketServer | |
import requests | |
import json | |
import getopt, sys | |
CONSUL_URL = 'http://localhost:8500' | |
# https://www.consul.io/docs/agent/http/agent.html#agent_service_register | |
def register_service(name, address, port): |
Zoneminder provides instructions for setting up Zoneminder on Ubuntu, but they assume you're using Apache: https://wiki.zoneminder.com/Ubuntu_Server_16.04_64-bit_with_Zoneminder_1.30.0_the_easy_way
I've moved away from Apache for webserving and wanted to see if there was a way to configure Zoneminder to work using Nginx and php-fpm. After a lot of trial and error I got it working. Include the snippet above in your nginx config to get it working at http:///zoneminder/ .