Skip to content

Instantly share code, notes, and snippets.

@dantleech
dantleech / convert.php
Last active November 23, 2018 13:18
Script to convert symfony YAML translation file to XLIFF
<?php
// Script to convert Symfony YAML translation files to XLIFF.
//
// Will add a .xliff version of the given file in its directory.
//
// $ php convert.php path/to/MyBundle.en.yml
$file = $argv[1];
@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'));