Skip to content

Instantly share code, notes, and snippets.

View mateuslacorte's full-sized avatar

Mateus M. Côrtes mateuslacorte

View GitHub Profile
<?php
$remote_addr = "your-ip-address";
$authorized = $_SERVER["REMOTE_ADDR"] === $remote_addr;
$uri = "mongodb+srv://your-user:your-password@your-mongodb-server/?retryWrites=true&w=majority";
$mongo = new MongoDB\Driver\Manager($uri);
$query = new MongoDB\Driver\Query([], []);
$activities_cursor = $mongo->executeQuery('schedule.schedule', $query);
$activities = [];
foreach ($activities_cursor as $activity) {
array_push($activities, [
@mateuslacorte
mateuslacorte / HeidiDecode.js
Created April 29, 2022 21:48 — 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'));
VMware vSphere 6 Enterprise Plus
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
VMware vSphere with Operations Management 6 Enterprise
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
#!/bin/bash
#
# Automate mysql secure installation for debian-baed systems
#
# - You can set a password for root accounts.
# - You can remove root accounts that are accessible from outside the local host.
# - You can remove anonymous-user accounts.
# - You can remove the test database (which by default can be accessed by all users, even anonymous users),
# and privileges that permit anyone to access databases with names that start with test_.