Skip to content

Instantly share code, notes, and snippets.

View paulirwin's full-sized avatar
🙃

Paul Irwin paulirwin

🙃
View GitHub Profile
@paulirwin
paulirwin / JaroWinklerStringSimilarity.sql
Last active April 29, 2024 17:52
Jaro-Winkler String Similarity in T-SQL
-- Based on code here: http://www.sqlservercentral.com/articles/Fuzzy+Match/65702/
-- Modified to be used in SQL Server Database Projects or run on its own, and fixed similarity vs distance confusion
CREATE FUNCTION [dbo].JaroWinklerGetCommonCharacters(@firstWord VARCHAR(MAX), @secondWord VARCHAR(MAX), @matchWindow INT)
RETURNS VARCHAR(MAX) AS
BEGIN
DECLARE @CommonChars VARCHAR(MAX)
DECLARE @copy VARCHAR(MAX)
DECLARE @char CHAR(1)
DECLARE @foundIT BIT
@paulirwin
paulirwin / routing.php
Created September 30, 2016 15:08
CodeIgniter URL Suffix support for PHP Built-in Web Server
<?php
if (file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])) {
return false; // serve the requested resource as-is.
} else {
// this is the important part!
$_SERVER['SCRIPT_NAME'] = '/index.php';
include_once (__DIR__ . '/index.php');
}
@paulirwin
paulirwin / .dircolors
Created April 19, 2017 13:56
Dircolors/Vim config
# Dark 256 color solarized theme for the color GNU ls utility.
# Used and tested with dircolors (GNU coreutils) 8.5
#
# @author {@link http://sebastian.tramp.name Sebastian Tramp}
# @license http://sam.zoy.org/wtfpl/ Do What The Fuck You Want To Public License (WTFPL)
#
# More Information at
# https://github.com/seebi/dircolors-solarized
@paulirwin
paulirwin / hot-reload-notifier.ts
Created July 18, 2017 19:52
Webpack Hot Reload Notification with Toastr
/// <reference path="../types/webpack-hot-middleware.ts" />
import { Message } from "webpack-hot-middleware/client";
import * as Toastr from "toastr";
declare global {
interface MessageEventHandler {
(event: MessageEvent): void;
}
@paulirwin
paulirwin / rf24.ino
Created April 9, 2018 17:06
RF24 issue with Hologram Dash
/*
Copyright (C) 2012 James Coliz, Jr. <maniacbug@ymail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
Update 2014 - TMRh20
*/
/**
* Simplest possible example of using RF24Network
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
@paulirwin
paulirwin / Program.cs
Created January 25, 2024 15:32
IKVM MavenReference error macOS arm64
using System;
using opennlp.tools.sentdetect;
namespace Bug
{
public class Program
{
public static void Main(string[] args)
{
// get en-sent.bin from OpenNLP