This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All amateur radio call signs: | |
[a-zA-Z0-9]{1,3}[0123456789][a-zA-Z0-9]{0,3}[a-zA-Z] | |
Non-US call signs: | |
\b(?!K)(?!k)(?!N)(?!n)(?!W)(?!w)(?!A[A-L])(?!a[a-l])[a-zA-Z0-9][a-zA-Z0-9]?[a-zA-Z0-9]?[0123456789][a-zA-Z0-9][a-zA-Z0-9]?[a-zA-Z0-9]?[a-zA-Z0-9]?\b | |
US call signs: | |
[AKNWaknw][a-zA-Z]{0,2}[0123456789][a-zA-Z]{1,3} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
//based on that nice demo at https://html5demos.com/dnd-upload/ | |
$.fn.upl = function (options) { | |
var tests = { | |
filereader: typeof FileReader != 'undefined', | |
dnd: 'draggable' in document.createElement('span'), | |
formdata: !!window.FormData, | |
progress: "upload" in new XMLHttpRequest | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Laravel queue worker using systemd | |
# ---------------------------------- | |
# | |
# /lib/systemd/system/queue-main.service | |
# | |
# run this command to enable service: | |
# systemctl enable queue-main.service | |
[Unit] | |
Description=Laravel queue worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
# File: | |
# nginx_modsite | |
# Description: | |
# Provides a basic script to automate enabling and disabling websites found | |
# in the default configuration directories: | |
# /etc/nginx/sites-available and /etc/nginx/sites-enabled | |
# For easy access to this script, copy it into the directory: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var querystring=(function (s) { | |
if (s === "")return {};var c = {};for (var e = 0; e < s.length; ++e) { | |
var f = s[e].split("=");if (f.length !== 2)continue;c[f[0]] = decodeURIComponent(f[1].replace(/\+/g, " ")); | |
}return c; | |
})(window.location.search.substr(1).split("&")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<a class="btn btn-link" data-checkall=".chst">check all</a> | |
<a class="btn btn-link" data-uncheckall=".chst">uncheck all</a> | |
*/ | |
var changeBoxesEvent = document.createEvent('HTMLEvents'); | |
changeBoxesEvent.initEvent('change', true, false); | |
var t = document.querySelectorAll('[data-uncheckall]'); | |
if (t) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<sql> | |
CREATE FUNCTION `alphanum`( str CHAR(255) ) RETURNS char(255) CHARSET utf8 | |
BEGIN | |
DECLARE i, len SMALLINT DEFAULT 1; | |
DECLARE ret CHAR(255) DEFAULT ''; | |
DECLARE c CHAR(1); | |
SET len = CHAR_LENGTH( str ); | |
REPEAT | |
BEGIN | |
SET c = MID( str, i, 1 ); |