Skip to content

Instantly share code, notes, and snippets.

Avatar
🦕
☄️

Colin Wilson colinwilson

🦕
☄️
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am colinwilson on github.
  • I am colinwilson (https://keybase.io/colinwilson) on keybase.
  • I have a public key whose fingerprint is F624 075F FE09 254B 5DC2 E158 6D34 5B49 8FAC E1A6

To claim this, I am signing this object:

@colinwilson
colinwilson / gist:acc0a26ead3da36e07bc
Created Jul 6, 2015
Debian - See all failed/successful SSH login attempts
View gist:acc0a26ead3da36e07bc
#As root or via sudo, type this to see all failed login attempts
cat /var/log/auth.log | grep 'sshd.*Invalid'
#If you want to see successful logins, type this
cat /var/log/auth.log | grep 'sshd.*opened'
#View all failed login attempts in real-time
tail -f /var/log/auth.log | grep 'sshd.*Invalid'
View dnsBlacklists.txt
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
View cloud-config.yml
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDE5vnrI12tbo9gZn0dvMRtJnJMOMAgcKWdMT6HKifoEgxb+bA6JsXhRvotu4ttpCMmWgFKNmmSiEbTYS5dJLKG+fssw7HUbYN+wgayS2TQF6AwEW47K65wEu/WjSPVHhg1Sv91k+ZbJW8Me6Z2+QRc9Pg9CO9om6/RZkzueIr8Em6DMu+gM2+AVvgAzFn6uPJZNC82JpnnZWohwSRbkaSY3YEoxpvyZz06aAWEulnQ88BAvS+JkI3kocOqvDXEqESF2xYcpw1SQrHdCROBlw/Rh+zDspVUhjl+lze7T7H+S37tBsFg6QBbiGmNc5dl0olYneWNmOxNTMtjLmkj9xe85t8hs2iQxCdIjbon6Q9oJDleawPkYuv2n902U66tyX1B5d4i+fpO950RXLmvUlYRbQyZzyHgHHI/xxJTEVJMdOBw8ewhgJ3HhvhukkmMiOT2Ycgy2dLhgA+IVmVSCcZKw7k/tIV0GtZen8nAebVJyUS1wj498SaGcPVlikDJfsCZXhlSoYlgsKG+iPQd+WwAK2MPD+Dru9GThqzWoe/RdBBGjTJ8tka6IWCV23iNRholHWSNYNVmrrYVw0Nis1pqSe9/FxgbaMg9Rp2tgVqPFz+ficqZOV0CtZQ9r45R5kq0nUvXQsRj+qY35Rh6S9xvXO5vBzHhnD55+VdjcaSWDw==
write_files:
- path: /opt/rancher/bin/start.sh
permissions: 0755
owner: root
content: |
#!/bin/bash
@colinwilson
colinwilson / ovh-srv-status.php
Created Dec 21, 2016
OVH Server Availability Checker
View ovh-srv-status.php
<?php
/*
* Script to check SoYouStart availability based on http://www.tienle.com/2014/09-03/script-check-soyoustart-availability.html
*/
define('CHECK_URL', 'https://ws.ovh.com/dedicated/r2/ws.dispatcher/getAvailability2');
define('NOTIFICATION_EMAILS', 'YOUR_EMAIL@DOMAIN.COM'); // Comma separated list of notifaction email address
define('SYSTEM_EMAIL', '0'); // 1 = enabled local smtp system
define('MAILGUN', '1'); // 1 = enable email through mailgun api, require an account on https://mailgun.org/
define('MAILGUN_API', 'YOUR_MAILGUN_API_KEY'); // Enter your Mailgun App API Key here
@colinwilson
colinwilson / zabbix-agent.xml
Created Dec 29, 2016 — forked from skarllot/zabbix-agent.xml
FirewallD service to Zabbix Agent
View zabbix-agent.xml
<?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 / README.md
Created Jan 22, 2017 — forked from oodavid/README.md
Deploy your site with git
View README.md

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 / general.php
Created Mar 6, 2017 — forked from joshuabaker/general.php
CloudFlare compatible config for Craft CMS.
View general.php
<?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 / hb_h.265_1080p.sh
Last active Feb 14, 2018
HandBrakeCLI Batch Conversion Script
View hb_h.265_1080p.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 / hbap.json
Created Feb 14, 2018
HandBrake Preset [h.265,1080p,audio passthrough]
View hbap.json
{
"PresetList": [
{
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",