This file contains hidden or 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
/* | |
LEV | |
Calculates the Levenshtein distance between two strings | |
Inputs | |
- a: a string to compare with b | |
- b: a string to compare with a | |
- [ii]: the [ii]th position in string a | |
- [jj]: the [jj]th position in string b |
This file contains hidden or 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
# configure-iis.ps1 | |
# Version: 1.2 | |
# Author: kking124 (https://github.com/kking124) | |
# | |
# Copyright 2016, 2017 | |
# | |
# License: MIT | |
# .SYNOPSIS | |
# Tries to configure IIS as a minimal, secure installation on Windows Server 2008 and later | |
# |
This file contains hidden or 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
/* | |
This function expects two hexStrings and relies on hexStrToRGBA to convert | |
to a JSON object that represents RGBA for the underlying Windows API to | |
understand. | |
Examples of valid values: | |
setAppBarColors('#FFFFFF','#000000'); | |
setAppBarColors('#FFF','#000'); | |
setAppBarColors('FFFFFF','000000'); | |
setAppBarColors('FFF','000'); |
This file contains hidden or 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
<?php | |
/** Important: When adding a second form to a website the second ModalAdmin extention would not function until I added it's | |
* Tested: 3.0 | |
* name into the same $managed_models array as the first. I was then able to take it out and have it work on it's own. | |
* ContactPage.php | |
* This is all the logic for the Contact page. | |
*/ | |
class ContactPage extends Page | |
{ |
This file contains hidden or 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
/* | |
* ACPI UBIX fix for Toshiba Satellite L750D | |
* https://bbs.archlinux.org/viewtopic.php?id=152543 | |
* | |
* Symptoms: | |
* ACPI Exception: AE_AML_PACKAGE_LIMIT, Index (0x0000000000000011) is beyond end of object (20120320/exoparg2-418) | |
* ACPI Error: Method parse/execution failed [\_SB_.BAT1.UBIX] (Node ffff880203e8a168), AE_AML_PACKAGE_LIMIT (20120320/psparse-536) | |
* ACPI Error: Method parse/execution failed [\_SB_.BAT1._BIX] (Node ffff880203e8a0f0), AE_AML_PACKAGE_LIMIT (20120320/psparse-536) | |
* ACPI Exception: AE_AML_PACKAGE_LIMIT, Evaluating _BIX (20120320/battery-419) | |
* |
This file contains hidden or 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
/* | |
Allows for ajax requests to be run synchronously in a queue | |
Usage:: | |
var queue = new $.AjaxQueue(); | |
queue.add({ | |
url: 'url', |
This file contains hidden or 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
using System; | |
using System.Linq; | |
using System.Web.Mvc; | |
public abstract class BaseController : Controller | |
{ | |
protected override JsonResult Json(object data, string contentType, System.Text.Encoding contentEncoding) | |
{ | |
return new JsonNetResult | |
{ |