Skip to content

Instantly share code, notes, and snippets.

@mlhDevelopment
mlhDevelopment / pguidgen.ahk
Last active November 5, 2024 13:58 — forked from ijprest/guidgen.ahk
AutoHotkey (AHK) v2 script to generate & paste a 32 character random hex string and format it like a GUID (i.e. a psuedo GUID)
; Exposes two hotkeys:
; - Win+G generates & pastes a new lowercase psuedo guid
; - Win+Shift+G generates & pastes a new UPPERCASE psuedo guid
; In both cases, the psuedo guid is left on the clipboard so you can easily paste it more than once.
; NOTE: this is technically not a GUID as defined by RFC 9562 since it does not attempt to use the
; recommended algorithms and no timestamp is embedded. It is only a 128 bit random number formatted
; as 32 hex values in the 8-4-4-4-12 GUID format.
; Win+G - Generate and paste a psuedo GUID
#g::
@mlhDevelopment
mlhDevelopment / cidrToIpRange.ps1
Last active October 12, 2024 10:06 — forked from davidjenni/cidrToIpRange.ps1
CIDR to IP range conversion using PowerShell
# calculate IP address range from CIDR notation
# https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
function cidrToIpRange {
param (
[string] $cidrNotation
)
$addr, $maskLength = $cidrNotation -split '/'
[int]$maskLen = 0
@mlhDevelopment
mlhDevelopment / maxViewItems.js
Created March 6, 2024 16:41
Kudu increase maxViewItems as bookmarklet
() => {
localStorage.setItem("maxViewItems", "999");
location.reload(); // optional
};
// javascript:(()=>{localStorage.setItem("maxViewItems", "999");location.reload();})();
@mlhDevelopment
mlhDevelopment / mutex.js
Last active August 29, 2015 14:11 — forked from oivoodoo/mutex.js
Javascript Mutex, with encapsulation
var Mutex = function() {
var queues = [];
var locked = false;
this.isLocked = function() {
return locked;
};
// It was about this point where I realized I didn't really want a mutex. I wanted a lock check......
this.push = function(callback) {
var self = this;
@mlhDevelopment
mlhDevelopment / gist:f84f7297131705a63191
Last active September 28, 2015 21:34 — forked from andyoakley/gist:1651859
Pivot Example
# Rotates a vertical set similar to an Excel PivotTable
#
# Given $data in the format:
#
# Category Activity Duration
# ------------ ------------ --------
# Management Email 1
# Management Slides 4
# Project A Email 2
# Project A Research 1
@mlhDevelopment
mlhDevelopment / mejs-double-length.html
Last active August 29, 2015 13:57
mejs Double Length in Mac FF
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<title>Vanilla Demo</title>
<!--<link rel="stylesheet" href="mediaelement/mediaelementplayer.css" />-->
<link href="http://mediaelementjs.com/js/mejs-2.13.2/mediaelementplayer.min.css" rel="Stylesheet" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<!--<script src="mediaelement/mediaelement-and-player.js"></script>-->
<script src="http://mediaelementjs.com/js/mejs-2.13.2/mediaelement-and-player.min.js"></script>