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
-- Returns the Levenshtein distance between the two given strings | |
function string.levenshtein(str1, str2) | |
local len1 = string.len(str1) | |
local len2 = string.len(str2) | |
local matrix = {} | |
local cost = 0 | |
-- quick cut-offs to save time | |
if (len1 == 0) then | |
return len2 |
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
$(document).ready( | |
function () { | |
var ie = navigator.userAgent.match(/msie/i); | |
if (ie != null) { | |
//fetch all input elements | |
var elements = document.getElementsByTagName('input'); | |
var element; | |
//loop through each, giving appropriates ones placeholders | |
for (var i = 0; i < elements.length; i++) { |
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 move(current, next, previous, length) { | |
if (next != null && current.value.length >= length) { | |
document.getElementById(next).focus(); | |
} | |
else if (previous != null && current.value.length <= 0) { | |
document.getElementById(previous).focus(); | |
} | |
} |
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
/** | |
* Converts the date passed into a string of the format passed. | |
* | |
* If the date is null, then today's date is used. | |
* If the format is null, then a default format of 'dd/MM/yyyy hh:mm:ss' is used. | |
* | |
* Possible format attributes are: | |
* | |
* - dd - 2 digit date (01, 12, 30). | |
* - ddd - Ordinal date (1st, 12th, 23rd). |
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
########################################################################### | |
# Author: Matthew Kelly (@Badgerati) | |
# Date: May 14 2015 | |
# | |
# MSBuildPath: Path to where your MSBuild.exe file resides | |
# Options: Array of typical MSBuild options such as /p:Configuration or /t:, etc | |
# Projects: Array of Project/Solution files | |
# CleanDebug: Switch to clean build in debug mode | |
# CleanRelease: Switch to clean build int release mode | |
# |
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
########################################################################### | |
# Author: Matthew Kelly (@Badgerati) | |
# Date: May 14 2015 | |
# | |
# MSBuildPath: Path to where your MSBuild.exe file resides | |
# Projects: Array of Project/Solution files | |
# CleanDebug: Switch to clean build in debug mode | |
# CleanRelease: Switch to clean build int release mode | |
# | |
# Example: |
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
########################################################################### | |
# Detects SQL files that are missing from sqlproj files within the given | |
# path. Useful for catching mis-merges that could cause a SProc to not | |
# get deployed, or a table index to get missing. | |
# | |
# Author: Matthew Kelly (@Badgerati) | |
# Date: July 27 2015 | |
# | |
# path: Path to where your .sqlproj files reside | |
# |
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
######################################################## | |
# Author: Matthew Kelly (Badgerati) | |
# | |
# This is a PowerShell wrapper around the inbuilt Jenkins CLI. | |
# It simplifies the calls to Jenkins, by just allowing you | |
# to call commands with a simple "jenkins" call. | |
# | |
# Best used with the path to the script in your PATH. | |
# | |
# Requirements: |
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
############################################################################### | |
# Script to generate Jira Release Notes. | |
# | |
# Release notes can be generated in either HTML, MD or just plain text. You can | |
# specify either the fixVersion, project tag/name or status(es) in any combination. | |
# | |
# Example: | |
# .\jira-release-notes.ps1 -jiraUrl 'http://jira.some.com' -project 'Potatoes' | |
# .\jira-release-notes.ps1 -jiraUrl 'http://jira.some.com' -fixVersion '1.2.0' | |
# .\jira-release-notes.ps1 -jiraUrl 'http://jira.some.com' -statuses @('Done') |
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
<# | |
.SYNOPSIS | |
Stops idle/crashed processes by Process Name | |
.DESCRIPTION | |
This function will stop and idle or crashed processed with the passed ProcessName. | |
To detect idle processes, it will first gather an initial list of processes, sleep | |
for a period of time then refetch the list. If any of the new list are identical | |
to the initial list, then these processes are stopped as they're deemed idle. |
OlderNewer