Skip to content

Instantly share code, notes, and snippets.

View bitcodr's full-sized avatar
πŸ‘¨β€πŸ’»
Focusing...

Amir Roshanaei bitcodr

πŸ‘¨β€πŸ’»
Focusing...
View GitHub Profile
@bitcodr
bitcodr / init.vim
Last active April 30, 2020 14:19
My NeoVim config
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
@ukn
ukn / 99-install-facetime-camera.sh
Last active April 12, 2025 09:13 — forked from Stono/99-install-facetime-camera.sh
Install the kernal module required for the facetimehd camera to work on Linux
#!/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"
@bitcodr
bitcodr / unfollow.js
Last active August 26, 2020 15:38
Bulk unfollow specific users according to thier jobs in Linkedin
// 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)
{
@petrstepanov
petrstepanov / install-facetime-hd-webcam.sh
Created September 28, 2020 04:22
Linux Install FaceTimeHD Camera
#!/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"
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active July 19, 2025 14:04
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@bitcodr
bitcodr / latency.md
Last active October 1, 2025 11:38
Latency Numbers For Software Engineers (2024-2025 Edition)

Core System Latencies

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