Skip to content

Instantly share code, notes, and snippets.

View technopagan's full-sized avatar

Tobias Baldauf technopagan

View GitHub Profile
#!/usr/bin/env bash
# Set locales to C (raw uninterpreted byte sequence) to avoid illegal byte sequence errors and invalid number errors
export LANG=C LC_NUMERIC=C LC_COLLATE=C
# Check for proper input parameters
# Filename and selected JPEG compressor should both be set
if [ -z $1 ] || [ -z $2 ]; then
echo "Please select 2 JPEGs to compare"
exit 1
###############################################################################
## Basic Configuration
###############################################################################
# Start Monit as background daemon and delay 1st check (in seconds) after boot
set daemon 60
with start delay 120
# Mail configuration
@technopagan
technopagan / default
Created December 7, 2012 08:23
High Performance Wordpress Webserver Stack with NGINX, PHP-FPM + APC and Varnish
# We only have one backend to define: NGINX
backend default {
.host = "127.0.0.1";
.port = "8080";
}
# Only allow purging from specific IPs
acl purge {
"localhost";
"127.0.0.1";
@technopagan
technopagan / style.css
Created December 5, 2012 12:49 — forked from iansoper/dabblet.css
Progressive Enahncement to use SVG sprites with PNG fallback for IE6+7
/**
* Progressive Enahncement to use SVG sprites with PNG fallback for IE6+7
*
* The trick:
* Legacy IE does not support rgba values.
* By defining a rgba background color together with the
* SVG background image for all modern browsers, legacy IE
* will ignore the SVG and use the
* first background definition containing the fallback PNG
*