Skip to content

Instantly share code, notes, and snippets.

View sahiljambhekar's full-sized avatar
💭
I may be slow to respond.

Sahil sahiljambhekar

💭
I may be slow to respond.
  • USA
View GitHub Profile
@sahiljambhekar
sahiljambhekar / README.md
Created August 16, 2022 19:28 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@sahiljambhekar
sahiljambhekar / .zprofile
Created July 19, 2022 05:23
Zprofile with fig.
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zprofile.pre.zsh" ]] && . "$HOME/.fig/shell/zprofile.pre.zsh"
eval "$(/opt/homebrew/bin/brew shellenv)"
#ZSH_THEME="agnoster"
DEFAULT_USER="sahiljambhekar"
# Set list of themes to load
# Setting this variable when ZSH_THEME=random
# cause zsh load theme from this variable instead of
# looking in ~/.oh-my-zsh/themes/
@sahiljambhekar
sahiljambhekar / .zshrc
Created July 19, 2022 05:21
Golden zshrc for M1 Homebrew+sdkman+miniforge
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && . "$HOME/.fig/shell/zshrc.pre.zsh"
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
@sahiljambhekar
sahiljambhekar / latency.txt
Created July 18, 2022 07:59 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
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
@sahiljambhekar
sahiljambhekar / FoldExamples.scala
Created August 8, 2018 00:11
Playing with Scala Collections
/*
Inspired from https://commitlogs.com/2016/09/10/scala-fold-foldleft-and-foldright/
*/
/*Find sum of first 10 integers.
For the first step: acc will be assigned 0
Thus making the first call (0,1) => 0+1 => 1 which will be assigned back to the acc.
Thus making the second call (1,2) => 1+2 => 3 , so on and so fourth.
*/
(1 to 10).foldLeft(0)( (acc,currentNumber) => acc + currentNumber )