Skip to content

Instantly share code, notes, and snippets.

View colinwilson's full-sized avatar
🌴

Colin Wilson colinwilson

🌴
View GitHub Profile

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 July 6, 2015 15:02
Debian - See all failed/successful SSH login attempts
#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'
@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
#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 December 21, 2016 16:29
OVH Server Availability Checker
<?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', '[email protected]'); // 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 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 / 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 / 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 / hb_h.265_1080p.sh
Last active February 14, 2018 19:32
HandBrakeCLI Batch Conversion Script
#!/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 February 14, 2018 19:31
HandBrake Preset [h.265,1080p,audio passthrough]
{
"PresetList": [
{
"AudioCopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:mp3",
"copy:truehd",