Skip to content

Instantly share code, notes, and snippets.

Colin Wilson colinwilson

Block or report user

Report or block colinwilson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View postgresql-geoip.sql
--
-- 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.
--
View hb_h.265_720p.sh
#!/bin/bash
# This script uses HandBrakeCLI to automatically convert a folder containing video files to H.265 (HEVC).
# You need to substitute SRC -- Source folder, DEST -- Destination folder,
# PRESET -- Preset name, & PRESET_FILE -- Preset file (json) for your own values
SRC="/root/video_in"
DEST="/root/video_out"
DEST_EXT=mkv
HANDBRAKE_CLI=HandBrakeCLI
@colinwilson
colinwilson / hbap720p.json
Created Jun 11, 2019
HandBrake Preset [h.265,720p,audio passthrough]
View hbap720p.json
{
"PresetList": [
{
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",
View hb_h.265_2160p.sh
#!/bin/bash
# This script uses HandBrakeCLI to automatically convert a folder containing video files to H.265 (HEVC).
# You need to substitute SRC -- Source folder, DEST -- Destination folder,
# PRESET -- Preset name, & PRESET_FILE -- Preset file (json) for your own values
SRC="/root/video_in"
DEST="/root/video_out"
DEST_EXT=mkv
HANDBRAKE_CLI=HandBrakeCLI
@colinwilson
colinwilson / hbap4k.json
Created Jun 6, 2019
HandBrake Preset [h.265,2160p,audio passthrough]
View hbap4k.json
{
"PresetList": [
{
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",
@colinwilson
colinwilson / kemp-cert-update_v1.2.sh
Last active Dec 5, 2018
pfSense KEMP cert autoupdate script
View kemp-cert-update_v1.2.sh
#!/bin/sh
#
# Title: Auto-Update & Upload LetsEncrypt Certs to KEMP LoadMaster
# Guide/Source: https://colinwilson.uk/2017/06/19/auto-update-ssl-certificates-on-kemp-loadmaster-via-pfsense-lets-encrypt/
# Created: 12/06/2017
# Update: 05/12/2018
# Author: Colin Wilson [https://github.com/colinwilson]
# Vendor or Software Link: https://www.pfsense.org/ , https://kemptechnologies.com
# Version: 1.2.1
@colinwilson
colinwilson / LICENCE SUBLIME TEXT
Created Nov 30, 2018 — forked from cantgis/LICENCE SUBLIME TEXT
Sublime Text 3 Serial key build is 3176
View LICENCE SUBLIME TEXT
## 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 -----
View KEMP SSO Image Set Partial Structure.txt
imagesets/ <------ tar this directory
MY IMAGE SET/
lm_initial.html
lm_logout.html
MANIFEST
INFO
lm_sso.js
....
View KEMP Blank SSO Image Set lm_inital.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; CHARSET=utf-8">
<title>KEMP Login Screen</title>
<meta content="NOINDEX, NOFOLLOW" name="Robots">
<link rel="shortcut icon" href="/lm_auth_proxy?LMimage=favicon.ico" type="image/x-icon">
<link href="/lm_auth_proxy?LMimage=kmgstyle.css" type="text/css" rel="stylesheet">
<style type="text/css">
body
View KEMP Custom SSO Image Set Structure.txt
imagesets/
MY IMAGE SET/
lm_initial.html
lm_logout.html
MANIFEST
INFO
lm_sso.js
espblank.gif
espbottom.gif
favicon.ico
You can’t perform that action at this time.