Skip to content

Instantly share code, notes, and snippets.

View martijnimhoff's full-sized avatar

Martijn Imhoff martijnimhoff

View GitHub Profile
@martijnimhoff
martijnimhoff / .php-cs-fixer.php
Last active February 21, 2022 10:06 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@martijnimhoff
martijnimhoff / mysql-levenshtein.sql
Created September 27, 2018 15:09 — forked from Kovah/mysql-levenshtein.sql
Levenshtein function for MySQL
-- Levenshtein function
-- Source: https://openquery.com.au/blog/levenshtein-mysql-stored-function
-- Levenshtein reference: http://en.wikipedia.org/wiki/Levenshtein_distance
-- Arjen note: because the levenshtein value is encoded in a byte array, distance cannot exceed 255;
-- thus the maximum string length this implementation can handle is also limited to 255 characters.
DELIMITER $$
DROP FUNCTION IF EXISTS LEVENSHTEIN $$
CREATE FUNCTION LEVENSHTEIN(s1 VARCHAR(255) CHARACTER SET utf8, s2 VARCHAR(255) CHARACTER SET utf8)
@martijnimhoff
martijnimhoff / 2017-08-14T15_56_48_813Z-debug.log
Created August 14, 2017 16:10
2017-08-14T15_56_48_813Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'bootstrap-switch',
1 verbose cli '--save' ]
2 info using npm@5.3.0
3 info using node@v8.2.1
4 verbose npm-session 6fbd658150cf89c9
5 silly install loadCurrentTree
var e = document.createElement('script'); e.setAttribute('src', 'https://nytimes.github.io/svg-crowbar/svg-crowbar.js'); e.setAttribute('class', 'svg-crowbar'); document.body.appendChild(e);