Skip to content

Instantly share code, notes, and snippets.

@randomecho
randomecho / australian-postcodes.sql
Last active October 19, 2025 11:12
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;
@plentz
plentz / nginx.conf
Last active October 22, 2025 16:10
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@bradleysa
bradleysa / gist:7d1448253097784daf94
Last active August 7, 2025 19:58
WooCommerce: Add Continue Shopping Button on Cart Page
<?php
/**
* Add Continue Shopping Button on Cart Page
* Add to theme functions.php file or Code Snippets plugin
*/
add_action( 'woocommerce_before_cart_table', 'woo_add_continue_shopping_button_to_cart' );
function woo_add_continue_shopping_button_to_cart() {
@bjornjohansen
bjornjohansen / maintenance.php
Created August 31, 2017 11:57
Custom WordPress maintenance mode page
<?php
wp_load_translations_early();
$protocol = wp_get_server_protocol();
header( "$protocol 503 Service Unavailable", true, 503 );
header( 'Content-Type: text/html; charset=utf-8' );
header( 'Retry-After: 30' );
?>
<!DOCTYPE html>
<html>
@helgatheviking
helgatheviking / wc-optional-redirect-to-checkout.php
Last active June 30, 2024 08:19
Woo Redirect Certain Products to Checkout- How to skip cart page on woocomerce for certain products only?
<?php
/**
* Plugin Name: WC Redirect to checkout
* Plugin URI: http://stackoverflow.com/q/32962653/383847
* Description: Redirect to checkout for certain products
* Version: 1.0.1
* Author: Kathy Darling
* Author URI: http://kathyisawesome.com
* Requires at least: 3.8
* Tested up to: 3.9
@kavicastelo
kavicastelo / Dev Math.md
Created June 13, 2025 18:26
A collection of 100 tongue-in-cheek (yet oddly accurate) equations that model the beautiful chaos of software development. This is your unofficial developer physics engine — balancing caffeine, meetings, deadlines, and dreams.

🔢 Dev Math: 100 Equations That Define Developer Reality

A collection of 100 tongue-in-cheek (yet oddly accurate) equations that model the beautiful chaos of software development.
This is your unofficial developer physics engine — balancing caffeine, meetings, deadlines, and dreams.

From productivity and debugging, to cognitive load, burnout, and system resilience — it's all math now.


💡 All equations are in LaTeX-style math, rendered in Markdown using $$...$$.