Skip to content

Instantly share code, notes, and snippets.

sudo sed -i '/partner$/s/^# *//' /etc/apt/sources.list &&
sudo add-apt-repository -y ppa:webupd8team/java &&
sudo apt-add-repository -s 'http://linux.dropbox.com/ubuntu main' &&
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E &&
sudo add-apt-repository -y ppa:graysky/utils &&
sudo add-apt-repository -y ppa:peterlevi/ppa &&
sudo apt-add-repository -y ppa:git-core/ppa &&
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - &&
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" >> /etc/apt/sources.list.d/virtualbox.list' &&
sudo apt-get update &&

Evolving ChakraCore on Node.js with rebases instead of merges

The Node.js master branch is constantly evolving. The chakracore-master branch is also evolving, both by fixing breaking changes from master and by landing new things, making it better. The goal of the chakracore-master branch is to produce a set of easy to review commits, that can be used to open a pull request against master.

For the master branch in a given moment (tagged master-DATE), we can create a chakracore-DATE branch that represents the state of ChakraCore on Node for that revision of master. When updating master, the dated chakracore branch should be rebased against the new dated master branch, creating a new dated chakracore branch using a pull request. Updates to ChakraCore and ChakraShim should either replace the commits of the original versions, or, if the update should be separated, have a different pull request. A chakracore-master branch can be created pointing to the most recent version of ChakraCo

# To install, run this in PowerShell:
# Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); get-boxstarter -Force; Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/joaocgreis/32f3f1314feb24951a0cffb6b77d1ca4/raw/boxcleaner.txt
# Ignore errors
$ErrorActionPreference = 'Continue'
#--- Uninstall unecessary applications that come with Windows out of the box ---
try {
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage
Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage
@joaocgreis
joaocgreis / results_fs.txt
Created February 28, 2024 17:04
Performance benchmarks using GetFileInformationByName
confidence improvement accuracy (*) (**) (***)
fs\\bench-accessSync.js n=100000 type='existing' * 1.23 % ±1.02% ±1.34% ±1.73%
fs\\bench-accessSync.js n=100000 type='non-existing' * 1.48 % ±1.37% ±1.81% ±2.33%
fs\\bench-accessSync.js n=100000 type='non-flat-existing' 0.23 % ±1.37% ±1.80% ±2.32%
fs\\bench-chmodSync.js n=1000 type='existing' *** 7.16 % ±2.78% ±3.67% ±4.72%
fs\\bench-chmodSync.js n=1000 type='non-existing' * 3.10 % ±2.42% ±3.19% ±4.11%
fs\\bench-existsSync.js n=1000000 type='existing' *** 68.95 % ±1.36% ±1.80% ±2.33%
fs\\bench-existsSync.js n=1000000 type='non-existing'
#!/bin/bash -e
# curl -L 'https://gist.githubusercontent.com/joaocgreis/1d77a9a5d45184a11430293f31af9d98/raw/rc.local' -o /etc/rc.local
# sudo chmod 755 /etc/rc.local
# sudo chown root:root /etc/rc.local
sleep 8
export DEBIAN_FRONTEND=noninteractive
ping -4 -c 1 -w 1 www.google.com && (for try in `seq 49 -1 0`; do
echo && echo === APT === &&