Skip to content

Instantly share code, notes, and snippets.

Avatar

BrendonKoz BrendonKoz

View GitHub Profile
@BrendonKoz
BrendonKoz / svg_mask.html
Created Jun 26, 2018
SVG Masking Example with multi-element mask
View svg_mask.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SVG Masking Test</title>
<style>
body {
background-color: #F0F;
@BrendonKoz
BrendonKoz / sticky-footer.css
Created Jun 15, 2018
Simplest and most versatile "sticky footer" ever
View sticky-footer.css
@BrendonKoz
BrendonKoz / DeleteOldRecycleBinFiles.ps1
Created Jan 31, 2018
A PowerShell script for deleting files (at logoff) from the Recycle Bin after X days of sitting in the bin.
View DeleteOldRecycleBinFiles.ps1
# -----------------------------------------------------------------------
#
# Author : Baldwin D.
# Description : Empty Recycle Bin with Retention (Logoff Script)
# Source : http://baldwin-ps.blogspot.be/2013/07/empty-recycle-bin-with-retention-time.html
#
# -----------------------------------------------------------------------
$Global:Collection = @()
@BrendonKoz
BrendonKoz / auto-caption-tools.md
Last active Sep 6, 2020
Automatic Captioning Tools
View auto-caption-tools.md
@BrendonKoz
BrendonKoz / word_stemmer.php
Created Feb 16, 2017
Splits words into their base word so that matching works more fluidly in text searches.
View word_stemmer.php
<?php
/**
* Copyright (c) 2005 Richard Heyes (http://www.phpguru.org/)
*
* All rights reserved.
*
* This script is free software.
*/
/**
@BrendonKoz
BrendonKoz / bk_autoupdate.php
Created Dec 22, 2015
"MUST USE" plugin. Place in wp-content/mu-plugins to assure automatic theme & plugin updates are happening.
View bk_autoupdate.php
<?php
/*
Plugin Name: Theme and Plugin Auto-Update
Description: Forces automatic updates of installed plugins and themes. Be sure to have backups running!
Version: 1.0
Author: Brendon Kozlowski
Author URI: http://www.bytekick.com
License: MIT
*/
View color_tests.php
<?php
/**
* Convert RGB colors array into HSL array
*
* @param array $ RGB colors set
* @return array HSL set
*/
function rgb_to_hsl($color){
list($r, $g, $b) = is_array($color) ? $color : hex_to_rgb($color);
@BrendonKoz
BrendonKoz / PHPExcelHelper.php
Created Oct 21, 2014
A helper class to make creating robust, but simple Excel workbooks with PHPExcel even easier.
View PHPExcelHelper.php
<?php
// import (and instantiate) the required 3rd party autoload class for all required classes
require_once('./path_to/PHPExcel.php');
// Call a member method that automatically guesses and assigns cell properties (Date, Number, Text, etc.)
PHPExcel_Cell::setValueBinder( new PHPExcel_Cell_AdvancedValueBinder() );
class ExcelHelper {
@BrendonKoz
BrendonKoz / gist:df1e0fefedd237120872
Created Aug 4, 2014
Simple CKEditor custom load (with jQuery)
View gist:df1e0fefedd237120872
$(document).ready(function(){
$('textarea').ckeditor({
contentsCss: '/css/ckeditor_custom.css', //external CSS to set body{margin:0;}
uiColor: '#FFFFFF',
scayt_autoStartup: true, //spellcheck auto-enabled
autoGrow_onStartup: true,
enterMode: CKEDITOR.ENTER_BR, //I hate this but our users request it
removePlugins: 'elementspath, resize',
extraPlugins: 'autogrow,confighelper', //confighelper allows HTML5-like placeholder text
extraAllowedContent: 'img[alt,dir,id,lang,longdesc,!src,title]{*}(*)', //needed to allow image pasting without an image button
View Recursive Windows server folder content deletion
@echo off
forfiles /p "\\server\Redirect" /m "Folder Name" /s /c "cmd /c del @file /Q"
You can’t perform that action at this time.