Skip to content

Instantly share code, notes, and snippets.

View bertolo1988's full-sized avatar
🎯
Focusing

Tiago BΓ©rtolo bertolo1988

🎯
Focusing
View GitHub Profile
@bertolo1988
bertolo1988 / auto_nvm_use.zsh
Last active January 16, 2026 12:02
Snippet of code for .zshrc config to run "nvm use" command if .nvmrc file is present in the directory
# Automatically call nvm use on directory change
# Only changes version if .nvmrc is found
autoload -U add-zsh-hook
load-nvmrc() {
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" = "N/A" ]; then
@bertolo1988
bertolo1988 / wallet-address-signature-demo.js
Created March 17, 2023 11:45
Verify ethereum wallet ownership remotely.
/**
First install and run ganache.
> npm install ganache --global
> execute this code https://gist.github.com/bertolo1988/096d436f072d2513eb4ff1cd83201c47
**/
const Web3EthAccounts = require('web3-eth-accounts');
const PORT = 61063;
@bertolo1988
bertolo1988 / eip-1193-provider.js
Created March 17, 2023 11:44
Launches an EIP-1193 provider locally.
const ganache = require('ganache');
const options = {};
const server = ganache.server(options);
const PORT = 0; // 0 means any available port
server.listen(PORT, async (err) => {
if (err) throw err;
console.log(`ganache listening on port ${server.address().port}...`);
});
Method name clone is callable typeof is function enumerable properties name prototype constructor clone is independent
cloneJSON ❌ ❌ ❌ ❌ ❌ ❌ ❌
structuredClone ❌ ❌ ❌ ❌ ❌ ❌ ❌
underscoreContribClone βœ… βœ… βœ… βœ… βœ… βœ… ❌
cloneNemisj βœ… βœ… βœ… βœ… βœ… βœ… ❌
cloneTrincot ❌ βœ… βœ… ❌ ❌ βœ… βœ…
cloneKoolDandy βœ… βœ… βœ… βœ… βœ… βœ… ❌
cloneRfdc βœ… βœ… βœ… βœ… βœ… βœ… ❌
justClone βœ… βœ… βœ… βœ… βœ… βœ… ❌
cloneDeep βœ… βœ… βœ… βœ… βœ… βœ… ❌
Method name should clone an object with circular reference to an element of the array
cloneJSON ❌
structuredClone βœ…
underscoreContribClone ❌
cloneNemisj ❌
cloneTrincot βœ…
cloneKoolDandy ❌
cloneRfdc βœ…
justClone ❌
cloneDeep ❌
Method name __proto__ by referencing clones the __proto__ non enumerable properties in the prototype
cloneJSON ❌ ❌ ❌
structuredClone ❌ βœ… ❌
underscoreContribClone ❌ ❌ ❌
cloneNemisj ❌ ❌ ❌
cloneTrincot ❌ ❌ ❌
cloneKoolDandy ❌ ❌ ❌
cloneRfdc ❌ ❌ ❌
justClone ❌ ❌ ❌
cloneDeep βœ… ❌ βœ…
Method name frozen sealed non extensible
cloneJSON ❌ ❌ ❌
structuredClone ❌ ❌ ❌
underscoreContribClone ❌ ❌ ❌
cloneNemisj ❌ ❌ ❌
cloneTrincot ❌ ❌ ❌
cloneKoolDandy ❌ ❌ ❌
cloneRfdc ❌ ❌ ❌
justClone ❌ ❌ ❌
cloneDeep ❌ ❌ ❌
Method name getter setter enumerable non enumerable enumerable and writable non enumerable non writable and configurable non enumerable writable and non configurable non enumerable non writable and non configurable own symbol
cloneJSON ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
structuredClone ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
underscoreContribClone ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
cloneNemisj ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
cloneTrincot ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
cloneKoolDandy ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
cloneRfdc ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
justClone ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
cloneDeep ❌ ❌ βœ… ❌ ❌ ❌ ❌ ❌ ❌
Method name shallow object non shallow object circular references typeof constructor
cloneJSON βœ… βœ… ❌ βœ… βœ…
structuredClone βœ… βœ… βœ… βœ… βœ…
underscoreContribClone βœ… βœ… ❌ βœ… βœ…
cloneNemisj βœ… βœ… ❌ βœ… βœ…
cloneTrincot βœ… βœ… βœ… βœ… βœ…
cloneKoolDandy βœ… βœ… ❌ βœ… βœ…
cloneRfdc βœ… βœ… ❌ βœ… βœ…
justClone βœ… βœ… ❌ βœ… βœ…
cloneDeep βœ… βœ… ❌ βœ… βœ…
Method name string number boolean undefined null Symbol BigInt
cloneJSON βœ… βœ… βœ… ❌ βœ… ❌ ❌
structuredClone βœ… βœ… βœ… βœ… βœ… ❌ βœ…
underscoreContribClone βœ… βœ… βœ… βœ… βœ… βœ… βœ…
cloneNemisj βœ… βœ… βœ… βœ… βœ… βœ… βœ…
cloneTrincot βœ… βœ… βœ… βœ… βœ… βœ… βœ…
cloneKoolDandy βœ… βœ… βœ… βœ… βœ… βœ… βœ…
cloneRfdc βœ… βœ… βœ… βœ… βœ… βœ… βœ…
justClone βœ… βœ… βœ… βœ… βœ… βœ… βœ…
cloneDeep βœ… βœ… βœ… βœ… βœ… ❌ βœ