Skip to content

Instantly share code, notes, and snippets.

View rwprodev's full-sized avatar

Carl Newlands rwprodev

View GitHub Profile
@joeworkman
joeworkman / upgrade_sendy.sh
Created March 21, 2019 18:55
This upgrades the version of Sendy installation for you. It creates a symlink from public_html to the actual version that you are running live. The public_html folder is doc root.
#!/usr/bin/zsh
if [ "$#" -ne 2 ]; then
echo "Usage: $0 OLD_VERSION NEW_VERSION" >&2
exit 1
fi
export OLD=$1
export NEW=$2
@exogen
exogen / uber.py
Last active November 16, 2023 15:55
Tally your Uber trips from a Gmail export
#!/usr/bin/env python3
#
# Usage: python3 uber.py ~/Downloads/Takeout/Mail/Uber.mbox
#
# Dependencies: Python 3.4+
#
# How to get the .mbox export:
#
# In Gmail, create a filter that applies the label "Uber" to emails matching:
#
@solancer
solancer / htaccess.expires.headers
Created December 13, 2016 21:01
htaccess expires headers
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 year"
# Data interchange
ExpiresByType application/atom+xml "access plus 1 hour"
@henrik
henrik / eu_country_codes.rb
Last active December 20, 2023 12:20
EU (European Union) country codes, ISO 3166-1 alpha-2. (This Gist is from 2012. Please see comments for updates.)
# Note: VAT identification numbers for Greece use "EL", not "GR".
COUNTRY_CODES_EU = %w[
AT BE BG CY CZ DK EE FI FR DE GR HU IE IT
LV LT LU MT NL PL PT RO SK SI ES SE GB
]