Skip to content

Instantly share code, notes, and snippets.

View chrisharrisonkiwi's full-sized avatar
:shipit:

Chris Harrison chrisharrisonkiwi

:shipit:
  • Wellington, New Zealand
View GitHub Profile
@pavinjosdev
pavinjosdev / validate_cidr.php
Last active February 23, 2023 15:19 — forked from mdjekic/validate_cidr.php
PHP function for validating CIDR notation format (ipv4, ipv6)
<?php
/**
* Validates the format of a CIDR notation string
*
* @param string $cidr
* @return bool
*/
function validateCidr($cidr)
{
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@jpatters
jpatters / HeidiDecode.js
Last active March 20, 2024 14:29
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
function heidiDecode(hex) {
var str = '';
var shift = parseInt(hex.substr(-1));
hex = hex.substr(0, hex.length - 1);
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
return str;
}
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));