Skip to content

Instantly share code, notes, and snippets.

Avatar

Rafael M. rafaelmaeuer

View GitHub Profile
View ios-xcode.env
# To use nvm with brew, uncomment the line below
. "$(brew --prefix nvm)/nvm.sh" --no-use
export NODE_BINARY=$(command -v node)
View node-mem.js
const formatMemoryUsage = (data) => `${Math.round(data / 1024 / 1024 * 100) / 100} MB`;
const memoryData = process.memoryUsage();
const memoryUsage = {
rss: `${formatMemoryUsage(memoryData.rss)} -> Resident Set Size - total memory allocated for the process execution`,
heapTotal: `${formatMemoryUsage(memoryData.heapTotal)} -> total size of the allocated heap`,
heapUsed: `${formatMemoryUsage(memoryData.heapUsed)} -> actual memory used during the execution`,
external: `${formatMemoryUsage(memoryData.external)} -> V8 external memory`,
};
View debug-vue-vite-vscode.json
// launch.json for Chrome
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Debug with Chrome",
"url": "http://localhost:4000",
"webRoot": "${workspaceFolder}/app"
View git-pgp-sign.sh
# (Optional) unset previous configuration
git config --global --unset gpg.format
# List all PGP Keys
gpg --list-secret-keys --keyid-format=long
# ------------------------------------
# sec 4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
# uid Hubot <hubot@example.com>
# Set signing key by key-id
View base64-from-cmd.sh
# Copy base64-string with cmd+c first
pbpaste | base64 --decode