Skip to content

Instantly share code, notes, and snippets.

@gerardroche
gerardroche / date-timezones-by-offset
Last active August 16, 2023 10:48
Timezones by offset
name: Pacific/Kiritimati , cc: KI , offset: 50400 (14 hours) , comments: Line Islands
name: Pacific/Chatham , cc: NZ , offset: 49500 (13.75 hours) , comments: Chatham Islands
name: Pacific/Fakaofo , cc: TK , offset: 46800 (13 hours) , comments:
name: Antarctica/South_Pole , cc: AQ , offset: 46800 (13 hours) , comments: Amundsen-Scott Station, South Pole
name: Antarctica/McMurdo , cc: AQ , offset: 46800 (13 hours) , comments: McMurdo Station, Ross Island
name: Pacific/Tongatapu , cc: TO , offset: 46800 (13 hours) , comments:
name: Pacific/Enderbury , cc: KI , offset: 46800 (13 hours) , comments: Phoenix Islands
name: Pacific/Apia , cc: WS , offset: 46800 (13 hours) , comments:
@gerardroche
gerardroche / robots.txt
Created October 7, 2014 00:41
robots.txt snippet
# For documentation on how to use the robots.txt file see:
#
# - http://www.robotstxt.org/
# - https://support.google.com/webmasters/answer/156449
#
# To ban all spiders from the entire site uncomment the next two lines see
# http://www.robotstxt.org/wc/norobots.html:
#
# User-Agent: *
# Disallow: /
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Site is down for maintenence</title>
</head>
<body>
<article>
<h1>Site is temporary unavailable.</h1>
<p>We are currently performing scheduled maintenance. Site will be back soon.</p>
@gerardroche
gerardroche / fix-banshee-db
Created October 7, 2014 00:37
Fix Banshee media player db after backup from another system
# backup
mkdir -pv ~/backup/banshee
cp ~/.config/banshee-1/banshee.db ~/backup/banshee/banshee.db
# clear any cache
rm -rfv ~/.cache/banshee-1/
# install sqlite3
sudo apt-get install sqlite3
@gerardroche
gerardroche / gist:9e08f18d4ef4dade35ca
Created October 7, 2014 00:17
ant-strip-php-require_once
<echo message="Stripping require_once calls..." />
<replaceregexp byline="true">
<regexp pattern="require_once" />
<substitution expression="// require_once" />
<fileset dir="${build.files.dir}" includes="**/*.php" />
</replaceregexp>
@gerardroche
gerardroche / composer-shim
Last active August 1, 2016 18:57
Script to enable `allow_url_fopen` when running composer on systems where `allow_url_fopen` defaults to off
# 301 https://github.com/gerardroche/dotfiles
@gerardroche
gerardroche / apt-get install fglrx updates
Created July 25, 2012 20:12
ATI/AMD proprietary FGLRX graphics install updates fix for Ubuntu
#!/bin/sh
if [ $(/usr/bin/id -u) != "0" ]; then
echo 'Must be run by root user'
exit 1
fi
apt-get --purge remove fglrx*
apt-get install fglrx-updates fglrx-amdcccle-updates