Skip to content

Instantly share code, notes, and snippets.

View colinwilson's full-sized avatar
⚗️

Colin Wilson colinwilson

⚗️
View GitHub Profile
--
-- GEOIP IN POSTGRESQL
--
-- We use two approaches. First using PostgreSQL inet and cidr types and indexing (PostgreSQL 9.4 and later),
-- and then using ip4r (https://github.com/RhodiumToad/ip4r).
-- The performance of ip4r indexes is significantly better than PostgreSQL's own index.
-- An operation that took 42s using ip4r took 47 minutes using PostgreSQL's cidr index.
--
@colinwilson
colinwilson / LICENCE SUBLIME TEXT
Created November 30, 2018 01:23
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@colinwilson
colinwilson / Craft3ValetDriver.php
Created April 28, 2018 15:06 — forked from brianjhanson/Craft3ValetDriver.php
Valet Driver for Craft 3
<?php
class Craft3ValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@colinwilson
colinwilson / general.php
Created March 6, 2017 00:51 — forked from joshuabaker/general.php
CloudFlare compatible config for Craft CMS.
<?php
if (isset($_SERVER['HTTPS']) && (strcasecmp($_SERVER['HTTPS'],'on') === 0 || $_SERVER['HTTPS'] == 1))
{
$protocol = 'https://';
}
else if ( ! empty($_SERVER['HTTP_X_FORWARDED_PROTO']))
{
$protocol = $_SERVER['HTTP_X_FORWARDED_PROTO'] . '://';
}
@colinwilson
colinwilson / README.md
Created January 22, 2017 02:41 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@colinwilson
colinwilson / zabbix-agent.xml
Created December 29, 2016 17:48 — forked from skarllot/zabbix-agent.xml
FirewallD service to Zabbix Agent
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Zabbix-Agent</short>
<description>Zabbix Agent listening port</description>
<port protocol="tcp" port="10050" />
</service>
@colinwilson
colinwilson / dnsBlacklists.txt
Last active August 29, 2015 14:26 — forked from cetanu/dnsBlacklists.txt
DNS Blacklists
b.barracudacentral.org
bl.deadbeef.com
bl.emailbasura.org
bl.spamcannibal.org
bl.spamcop.net
blackholes.five-ten-sg.com
blacklist.woody.ch
bogons.cymru.com
cbl.abuseat.org
cdl.anti-spam.org.cn