Skip to content

Instantly share code, notes, and snippets.

View BrendonKoz's full-sized avatar

BrendonKoz BrendonKoz

View GitHub Profile
@BrendonKoz
BrendonKoz / mysql_increment.txt
Created October 23, 2013 21:55
A way to get the next insert ID if you are certain there won't be any conflicts (other insertions during processing) from MySQL. Source: http://stackoverflow.com/a/12500309/155421
SELECT AUTO_INCREMENT
FROM information_schema.tables
WHERE table_name = 'table_name'
AND table_schema = DATABASE( ) ;
--- or ---
$result = mysql_query("SHOW TABLE STATUS LIKE 'table_name'");
@BrendonKoz
BrendonKoz / Preferences.sublime-settings
Created December 18, 2013 17:54
Sublime Text 3 - User settings
// Settings in here override those in "Default/Preferences.sublime-settings",
// and are overridden in turn by file type specific settings.
{
"auto_complete_commit_on_tab": true,
"auto_complete_with_fields": true,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/Color Scheme - Default/Mac Classic.tmTheme",
"font_face": "Courier New",
"font_size": 10,
@BrendonKoz
BrendonKoz / word_stemmer.php
Created February 16, 2017 23:19
Splits words into their base word so that matching works more fluidly in text searches.
<?php
/**
* Copyright (c) 2005 Richard Heyes (http://www.phpguru.org/)
*
* All rights reserved.
*
* This script is free software.
*/
/**
@BrendonKoz
BrendonKoz / DeleteOldRecycleBinFiles.ps1
Created January 31, 2018 18:08
A PowerShell script for deleting files (at logoff) from the Recycle Bin after X days of sitting in the bin.
# -----------------------------------------------------------------------
#
# 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 / sticky-footer.css
Created June 15, 2018 03:00
Simplest and most versatile "sticky footer" ever
@BrendonKoz
BrendonKoz / svg_mask.html
Created June 26, 2018 15:10
SVG Masking Example with multi-element mask
<!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 / auto-caption-tools.md
Last active August 14, 2023 13:28
Automatic Captioning Tools
@BrendonKoz
BrendonKoz / leaflet-darkmode.md
Last active March 19, 2024 08:29
Automatic Dark Mode for Leaflet.js
// Leaflet JS - note the *className* attribute
// [...]

L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
    className: 'map-tiles'
}).addTo(map);

// [...]