Skip to content

Instantly share code, notes, and snippets.

@evandhoffman
evandhoffman / reverseproxy.conf
Created Feb 15, 2012
nginx reverse proxy config
View reverseproxy.conf
proxy_cache_path /var/lib/nginx/cache/staticfiles levels=1:2 keys_zone=staticfilecache:120m inactive=180m max_size=50m;
proxy_cache_path /var/lib/nginx/cache/php levels=2:2 keys_zone=php:10m inactive=180m 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";
# http://wp-performance.com/2010/10/nginx-reverse-proxy-cache-wordpress-apache/
View simc khal.txt
# Khalshazar - Assassination - 2020-06-16 15:56 - US/Doomhammer
# SimC Addon 1.12.5
# Requires SimulationCraft 820-01 or newer
rogue="Khalshazar"
level=120
race=dark_iron_dwarf
region=us
server=doomhammer
role=attack
@evandhoffman
evandhoffman / parse-secure.pl
Created Nov 17, 2011
Parse /var/log/secure for hacking attempts and insert into a SQL DB
View parse-secure.pl
#!/usr/bin/perl
#########################################################################
# Parse /var/log/secure for attacks and log the attacks to a database.
# 11/16/2011
# evandhoffman@gmail.com
#########################################################################
use strict;
use warnings;
View jimb simc.txt
# Jimb - Havoc - 2020-04-16 13:01 - US/Doomhammer
# SimC Addon 1.12.5
# Requires SimulationCraft 820-01 or newer
demonhunter="Jimb"
level=120
race=night_elf
region=us
server=doomhammer
role=attack
View simc cellen.txt
# Cellen - Retribution - 2020-04-02 10:17 - US/Doomhammer
# SimC Addon 1.12.5
# Requires SimulationCraft 820-01 or newer
paladin="Cellen"
level=120
race=human
region=us
server=doomhammer
role=attack
View SimpleHTTPServerWithUpload.py
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@evandhoffman
evandhoffman / smb.conf
Created Feb 9, 2017
smb.conf with ZFS volumes mapped to Previous Versions
View smb.conf
[global]
# other stuff here...
shadow: snapdir = .zfs/snapshot
shadow: sort = desc
shadow: format = snap_%Y-%m-%d-%H%M
[public]
comment = Files for all
browseable = yes
@evandhoffman
evandhoffman / fetch-phpbb.pl
Created Mar 13, 2012
Perl script to fetch all topics in a phpBB forum and save them to disk
View fetch-phpbb.pl
#!/usr/bin/perl
use strict;
use warnings;
require LWP::UserAgent;
use POSIX qw/ceil/;
my $ua = LWP::UserAgent->new(agent => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20100101 Firefox/10.0.2');
$ua->timeout(10);
@evandhoffman
evandhoffman / README.md
Last active Mar 10, 2018
Ubuntu Nginx Zoneminder php-fpm config
View README.md

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/ .

View inovelli.txt
evan@lunix /hass/config % grep Node006 OZW_Log.txt
2018-02-26 10:59:17.849 Detail, Node006, Received: 0x01, 0x18, 0x00, 0x04, 0x00, 0x06, 0x12, 0x32, 0x02, 0xa1, 0x6c, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b
2018-02-26 11:49:24.528 Detail, Node006, Received: 0x01, 0x18, 0x00, 0x04, 0x00, 0x06, 0x12, 0x32, 0x02, 0xa1, 0x6c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e
2018-03-01 19:02:28.974 Info, Node006, Network Key Not Set - Secure Option is not required
2018-03-01 19:02:28.976 Info, Node006, Basic device class (0x04) - Routing Slave
2018-03-01 19:02:28.976 Info, Node006, Generic device Class (0x10) - Binary Switch
2018-03-01 19:02:28.976 Info, Node006, Specific device class (0x01) - Binary Power Switch
2018-03-01 19:02:28.976 Info, Node006, COMMAND_CLASS_BASIC will be mapped to COMMAND_CLASS_SWITCH_BINARY
2018-03-01 19:02:28.976 Info, Node006, Mandatory Command Classes for Node 6:
2018-03-01 19: