Skip to content

Instantly share code, notes, and snippets.

Aldo Fregoso AldoMX

Block or report user

Report or block AldoMX

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
AldoMX / local.user-key-mapping.plist
Created Oct 12, 2019
Changes the mapping between “§” and “`” keys when using US distribution with non-US keyboards. Download it to `/Library/LaunchDaemons/local.user-key-mapping.plist` and launch it with `launchctl load -w /Library/LaunchDaemons/local.user-key-mapping.plist`.
View local.user-key-mapping.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
AldoMX / rocksdb.js
Created Nov 11, 2018
ES2018 wrapper for `rocksdb`, works without Babel with Node.js v10 and upwards
View rocksdb.js
const rocksdb = require('rocksdb');
const valueCallback = resolve => (err, value) => err ? Promise.reject(err) : resolve(value);
class RocksDBIterator {
constructor(iterator) {
this.iterator = iterator;
async end() {

Installing Windows 10 to an external drive without a Windows host

The long story

We were talking at the office about having a LAN Party and playing some old school games like Age of Empires and Starcraft. The issue is that I have Linux installed. I didn't want to ruin everyone else's fun by having random crashes, out-of-sync errors and similar stuff using Wine, and I didn't want to do the dual boot dance, so I figured out that the best option was to install Windows to an external drive.

AldoMX /
Last active Nov 26, 2017
Start services during WSL startup
sudo service atd start
sudo service cron start
sudo service dbus start
sudo service irqbalance start
sudo service lvm2-lvmetad start
sudo service lvm2-lvmpolld start
sudo service mdadm start
sudo service ondemand start
sudo service rc.local start
View sequential-promise.js
/*export default*/ module.exports = (callbacks, timeout = 0) => {
callbacks = callbacks.reverse();
return new Promise((resolve, reject) => {
const values = [];
const errors = [];
let hasError = false;
(function nextPromise() {
let currentCallback = callbacks.pop();
if (currentCallback) {
AldoMX / Steps.cpp
Last active Mar 10, 2017
View Steps.cpp
float Steps::PredictMeter() const
// Aldo_MX: I'm calculating the meter taking into account the step density.
// It will just give a "base value", you need to increase the value if you
// use pivots and/or it's a gimmicky chart.
// In other words, this value should be considered the "minimum possible"
// meter value using 1 ~ 10 difficulty scale.
// The following formula is used ONLY with checkpoint combinations possible
AldoMX / RageSoundReader_FFMpeg.cpp
Last active Feb 21, 2017
RageSoundReader_FFMpeg - Sound reader for any format supported by FFMpeg, written for StepMania 3.9, tested with FFMpeg 2.1.4, GPLv2
View RageSoundReader_FFMpeg.cpp
#include "global.h"
#include "RageFile.h"
#include "RageLog.h"
#include "RageSoundManager.h"
#include "RageUtil.h"
#include "RageSoundReader_FFMpeg.h"
namespace avcodec
AldoMX / RemoveOneDriveDropboxNavigationPane.reg
Created Dec 26, 2016
Remove OneDrive and Dropbox from the Navigation Pane in Windows 10
View RemoveOneDriveDropboxNavigationPane.reg
Windows Registry Editor Version 5.00
; Remove OneDrive
; Remove Dropbox
AldoMX / PersonaFisica.js
Last active Oct 20, 2016
Implementación en JavaScript del algoritmo para generar el RFC para personas físicas (IFAI 0610100135506)
View PersonaFisica.js
* PersonaFisica.js
* Implementación en JavaScript del algoritmo para generar el RFC para personas
* físicas (IFAI 0610100135506)
* Copyright 2015 Aldo Fregoso.
* El uso de este archivo está permitido bajo los términos de la licencia de
* código abierto "GNU Affero General Public License" (AGPL) disponible en:
View bitfield.hpp
* This file was written by Aldo Fregoso, and is placed in the public domain.
* The author hereby disclaims copyright to this source code.
#include <inttypes.h>
You can’t perform that action at this time.