Skip to content

Instantly share code, notes, and snippets.

View sagi's full-sized avatar
Making

Sagi Kedmi sagi

Making
View GitHub Profile
@sagi
sagi / all_uncomitted_local_repos_in_dir_tree.md
Last active February 10, 2023 04:42
Find all uncommitted locals repos in a directory tree

Find all uncommitted local repos in a directory tree

$ find . -type d -name '.git' | while read dir ; do sh -c "cd $dir/../ && echo -e \"\nGIT STATUS IN ${dir//\.git/}\" && git status -s" ; done

Taken from: https://stackoverflow.com/a/32815987

@sagi
sagi / 0-startup-overview.md
Created March 31, 2021 15:08 — forked from dideler/0-startup-overview.md
Startup Engineering notes
@sagi
sagi / sof-audio-setup-carbonx1.sh
Created January 8, 2020 22:37 — forked from hamidzr/sof-audio-setup-carbonx1.sh
Lenovo Carbon X1 Gen 7 - Audio and microphone fix - Arch Linux and kernel 5.3+ required. Updates will be made as they become necessary / available.
#!/bin/bash
## Description
# Lenovo Carbon X1 Gen 7 - Audio and microphone fix - kernel 5.3+ required.
# The script has only been tested for Arch and OpenSuse,
# Original thread: https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/td-p/4489823
# Prereq: Install Linux 5.3 or newer
# NOTE: run this script as root and at your own risk.
@sagi
sagi / install_google_fonts.sh
Created April 7, 2019 09:27
Installing Google Fonts on Ubuntu
wget https://raw.githubusercontent.com/hotice/webupd8/master/install-google-fonts && chmod +x install-google-fonts && ./install-google-fonts
@sagi
sagi / fzf_config_with_ripgrep_and_fd.sh
Created April 6, 2019 03:20
FZF Config with Ripgrep and Fd (Fast Rust-based CLI tools)
export FZF_DEFAULT_COMMAND="rg --files --no-ignore-vcs --glob '!*/{.git,node_modules}/**'"
export FZF_CTRL_T_COMMAND="rg --files --no-ignore-vcs --glob '!*/{.git,node_modules}/**'"
export FZF_ALT_C_COMMAND="fd --type d --no-ignore-vcs --exclude node_modules --exclude .git"
@sagi
sagi / reverse.js
Created December 18, 2018 10:03
Reversing a String in Javascript
const reverse = s => (s === '' ? '' : reverse(s.substr(1)) + s.charAt(0));
@sagi
sagi / debug_latency.sh
Created November 2, 2018 22:29
Debug DNS, TCP, TLS Latency Issues with Curl
curl -w "dns_resolution: %{time_namelookup}, tcp_established: %{time_connect}, ssl_handshake_done: %{time_appconnect}, TTFB: %{time_starttransfer}\n" -o /dev/null -s https://cloudflare-dns.com
@sagi
sagi / click_on_tap_i3_ubuntu_18.04.md
Created October 25, 2018 08:38
Click on Tap for i3, Ubuntu 18.04

Check out the xinput command. xinput list will give you a list of input devices; find the ID of the one which looks like a touchpad. Then do xinput list-props <device id>, which should tell you what properties you can change for the input device. You should find one called something like Tapping Enabled and a number in parens after it (in my case, it's libinput Tapping Enabled (276). Finally, run xinput set-prop <device id> <property id> 1, and tapping should work.

To make the change permanent, find a way to run that command on startup. One way would be to add exec xinput set-prop <device id> <property id> 1 to ~/.i3/config.

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@sagi
sagi / osx_vbx.sh
Created August 5, 2017 10:25
OSX on VirtualBox vboxmanage
#!/bin/bash
vboxmanage modifyvm "osx" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
vboxmanage setextradata "osx" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
vboxmanage setextradata "osx" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
vboxmanage setextradata "osx" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
vboxmanage setextradata "osx" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
vboxmanage setextradata "osx" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
vboxmanage setextradata "osx" VBoxInternal2/EfiGopMode 5