Skip to content

Instantly share code, notes, and snippets.

View Aloento's full-sized avatar
🇨🇳
SoarCraft

Aloento Aloento

🇨🇳
SoarCraft
  • SoarCraft
  • Foot of Sacred Mountain
View GitHub Profile
@asukakenji
asukakenji / 0-go-os-arch.md
Last active September 24, 2024 13:53
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@EudyContreras
EudyContreras / SceneCaptureUtility.txt
Last active December 24, 2020 18:48
JavaFX Scene Capture Utility
/*
* JavaFX SceneCaptureUtility 2016/07/02
*
* The author of this software "Eudy Contreras" grants you ("Licensee")
* a non-exclusive, royalty free, license to use,modify and redistribute this
* software in source and binary code form.
*
* Please be aware that this software is simply part of a personal test
* and may in fact be unstable. The software in its current state is not
@ryasmi
ryasmi / convertBase.js
Last active August 11, 2023 10:07
Moved to https://github.com/ryasmi/baseroo - Converts a number represented as a string from one base to another (up to 64).
function convertBase(value, from_base, to_base) {
var range = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/'.split('');
var from_range = range.slice(0, from_base);
var to_range = range.slice(0, to_base);
var dec_value = value.split('').reverse().reduce(function (carry, digit, index) {
if (from_range.indexOf(digit) === -1) throw new Error('Invalid digit `'+digit+'` for base '+from_base+'.');
return carry += from_range.indexOf(digit) * (Math.pow(from_base, index));
}, 0);