Skip to content

Instantly share code, notes, and snippets.

View t0mtaylor's full-sized avatar
🏠
Working from home

Tom Taylor t0mtaylor

🏠
Working from home
View GitHub Profile
@t0mtaylor
t0mtaylor / gist:1c2d3d6a783f417832e4770e8ad50095
Created November 3, 2021 16:16
Cpanel Dyn DNS Custom updater script PHP for OpenWRT
<?php
// Based on the hard work of Mitchel Haan
// https://haanenterprises.com/2013/04/host-your-own-dynamic-dns-using-php-and-cpanel-apis/
//
// usage:
// http://username:password@website.com/dyndns.php?hostname=remote&myip=192.168.1.1
//
// per the settings below, the above will update the IP remote.example.com to 192.168.1.1
// myip is not required, will default to the remote IP calling the script
//
@t0mtaylor
t0mtaylor / sc.sh
Last active April 15, 2019 16:04
#!/bin/bash
# StatusCake Auto IPs
# Author: @t0mtaylor, @HKirste
# Origin: https://github.com/hkirste/CloudFlare-auto-IPs
# Date: 25/10/2016
# Version 0.2
# wget -q https://gist.githubusercontent.com/t0mtaylor/d36d482be8284fb4cc4866eb05d53d97/raw/sc.sh -O sc.sh && chmod +x sc.sh && ./sc.sh
TYPE="allow"
CRON="/etc/cron.d/sc.cron"
LOCATION="/usr/local/sc"
#build-pipeline-plugin-content {
background-color: none;
border-radius: 0;
}
#build-pipeline-plugin-content h1 {
display: none;
}
tbody.pipelineGroup {
# http://pecl.php.net/package/APCu
# http://pecl.php.net/package/ZendOpcache
# Install ZendOpcache
sudo pecl install ZendOpcache-beta
sudo -i
cat > /etc/php5/mods-available/opcache.ini << EOF
zend_extension=/usr/lib/php5/20100525/opcache.so
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
@t0mtaylor
t0mtaylor / gist:e9f8188b311328352035
Last active August 29, 2015 14:03
SSL Secure Ciphers 2014 for Apache 2.4+
<IfModule mod_fcgid.c>
FcgidMaxRequestLen 1073741824
</IfModule>
SSLProtocol -SSLv2 -SSLv3 +TLSv1.2 +TLSv1.1 +TLSv1
#+SSLv3 #Disable SSL 3.0, only IE6/XP uses it - POODLE! https://www.openssl.org/~bodo/ssl-poodle.pdf
SSLCompression off
SSLHonorCipherOrder on
SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA128:DHE-RSA-AES128-GCM-SHA384:DHE-RSA-AES128-GCM-SHA128:ECDHE-RSA-AES128-SHA384:ECDHE-RSA-AES128-SHA128:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA384:AES128-GCM-SHA128:AES128-SHA128:AES128-SHA128:AES128-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
<?
chdir( dirname ( realpath(__DIR__) ) );
chdir( 'tmp/' );
$days = 0;
$hours = 3;
$root = getcwd()."/cache/";
for (var i = 0; i < allImgs.length; i++)
//shorthand
for(var i in allImgs)
//cache
var i, allImgsLen = allImgs.length;
for (i = 0; i < allImgsLen i++)
//quick reverse << FAST!
/**
* Disable and enable event on scroll begin and scroll end.
*
* Quick tidy, auto for active hover styles, and set in self executing method
* Check for addEventListener, don't bother with IE8 and older browsers
* Tom Taylor - 03/06/14 - http://tommytaylor.co.uk
*
* @see http://www.thecssninja.com/javascript/pointer-events-60fps
*/
(function(w, d) {
@t0mtaylor
t0mtaylor / jshint-config.json
Last active December 19, 2015 19:48 — forked from rtircher/jshint-runner.js
Include external json config file for JSHINT Options, also added XML Checkstyle output for use with CI such as Jenkins - create a task to merge the start and end xml files with the output data from jshint to create your checkstyle report (see comments)
{
"smarttabs" : true,
"-W099" : true
}