Skip to content

Instantly share code, notes, and snippets.

View giflw's full-sized avatar
🚛

Guilherme I F L Weizenmann giflw

🚛
View GitHub Profile
@giflw
giflw / Vagrantfile
Created September 22, 2021 01:43 — forked from leifg/Vagrantfile
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@giflw
giflw / HeidiDecode.js
Created July 26, 2022 03:37 — forked from jpatters/HeidiDecode.js
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'));
@giflw
giflw / _ServiceWorker_for_github_pages.md
Created January 22, 2023 19:02 — forked from kosamari/_ServiceWorker_for_github_pages.md
ServiceWorker for github pages.

ServiceWorker for github pages

This is a ServiceWorker template to turn small github pages into offline ready app.

Why ?

Whenever I make small tools & toys, I create github repo and make a demo page using github pages (like this one).
Often these "apps" are just an index.html file with all the nessesary CSS and JavaScript in it (or maybe 2-3 html/css/js files). I wanted to cache these files so that I can access my tools offline as well.

Notes

Make sure your github pages have HTTPS enforced, you can check Settings > GitHub Pages > Enforce HTTPS of your repository.

@giflw
giflw / youtube-anonymous-playlist-simple-generator.html
Created January 29, 2025 02:49
YouTube anonymous playlist simple generator
<!DOCTYPE html>
<body style="font-family: sans-serif;">
<p>
<label>
Youtube URLs:<br>
<textarea id="input" style="box-sizing: content-box; width: 100%; min-height: 8em; line-height: 1.4em; padding: 0.2em"></textarea>
</label>
</p>
<p>
<label>