Operation Latency Human Scale*
═══════════════════════════════════════════════════════════════════════
L1 cache reference 0.5 ns 1 second
Branch mispredict 5 ns 10 seconds
L2 cache reference 7 ns 14 seconds
Mutex lock/unlock 25 ns 50 seconds
Main memory reference 100 ns 3.3 minutes
Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active. The workaround breaks down into two problems:
- Network connection to internet
- DNS in WSL2
This problem is tracked in multiple microsoft/WSL issues including, but not limited to:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
export CONFIG_MODULE_SIG=n | |
export CONFIG_MODULE_SIG_ALL=n | |
# For current kernel | |
export KERNELRELEASE=$(cat /proc/version | awk '{print $3}') | |
temp_dir=$(mktemp -d) | |
echo "Installing FacetimeHD camera for $KERNELRELEASE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1 - go to this page https://www.linkedin.com/feed/following/ | |
// 2 - open browser console past the code as below and click Run | |
var buttons = $("button"), | |
interval = setInterval(function(){ | |
var btn = $('.is-following'); | |
var v = document.querySelectorAll("p.follows-recommendation-card__headline"); | |
for(y in v) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if empty(glob('~/.config/nvim/autoload/plug.vim')) | |
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd! | |
autocmd VimEnter * PlugInstall | |
endif | |
call plug#begin('~/.config/nvim/plugged') | |
"File Search: | |
Plug 'ctrlpvim/ctrlp.vim' " fuzzy find files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.item_01.find().snapshot().forEach( | |
... function (elem) { | |
... db.item_01.update( | |
... { | |
... _id: elem._id | |
... }, | |
... { | |
... $set: { | |
... type: elem.attr_values[1] | |
... } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function rules() | |
{ | |
$user = User::find($this->users); | |
switch($this->method()) | |
{ | |
case 'GET': | |
case 'DELETE': | |
{ | |
return []; |