These notes are compatible with VSCode/Cursor having the following specs. Steps for other versions may vary.
Version: 0.42.3
VSCode Version: 1.93.1
Commit: 949de58bd3d85d530972cac2dffc4feb9eee1e40
Date: 2024-10-16T17:56:07.754Z
Electron: 30.4.0
var https = require('https'), | |
user = process.argv[2], | |
opts = parseOpts(process.argv.slice(3)) | |
request('/users/' + user, function (res) { | |
if (!res.public_repos) { | |
console.log(res.message) | |
return | |
} | |
var pages = Math.ceil(res.public_repos / 100), |
Highlighted block quotes for GitHub MD files
Reference: https://github.com/orgs/community/discussions/16925
> [!NOTE]
> Highlights information that users should take into account, even when skimming.
> [!TIP]
#!/bin/bash | |
# Prints the version of a nodejs package.json file | |
VERSION=`node -e "console.log(require('../app/package.json').version)"` | |
echo Synchronizing all modules to version $VERSION |
A list of interesting React optimization techniques.
[1] Do less work during rendering
:: Compact/compress the size of an Ubuntu VDI file on VirtualBox (v7.0) running in a Windows host | |
:: The VDI file should should have previously run "compact.sh" in the VM before running this script | |
:: Add VBoxManage.exe to the PATH variable to make it globally available. Usually it's in | |
:: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe | |
VBoxManage.exe modifymedium --compact c:\path\to\thedisk.vdi |
# Compact/compress the size of an Ubuntu VDI file on VirtualBox (v7.0) | |
# Run this script in the Ubuntu VM running in VirtualBox | |
# Shut down the VM after then run "compact.bat" on the Windows host | |
df -h | |
echo "Nullifying free space..." | |
sudo dd if=/dev/zero of=/var/tmp/bigemptyfile bs=4096k status=progress ; sudo rm -f /var/tmp/bigemptyfile |
const string = 'Hello, World!' | |
// Split the a string into words while removing special characters | |
const words = string.replace(/[!@#$%^&*()_+\-=\[\]{};:"\\|,.<>\/?]/g, '').split(' ').filter(x => x.match(/[a-z]/g)) | |
console.log(words) |