Skip to content

Instantly share code, notes, and snippets.

View sidoshi's full-sized avatar

Siddharth Doshi sidoshi

View GitHub Profile
@sidoshi
sidoshi / sh-aliases
Created January 8, 2018 06:59
A set of aliases I use in terminal shells
alias ghub="cd ~/Github"
alias glab="cd ~/Gitlab"
alias s="git status"
alias p="git push"
alias textedit="open -a TextEdit"

Keybase proof

I hereby claim:

  • I am sidoshi on github.
  • I am sidoshi (https://keybase.io/sidoshi) on keybase.
  • I have a public key ASAcoNHu1o7huOoq0qkycojXOr5POWxtwhzCojFoW9baLQo

To claim this, I am signing this object:

@sidoshi
sidoshi / tree-compiler.js
Created May 20, 2018 10:09
A parser for tree syntax
// const input =
// '(2 (7 (2 () ()) (6 (5 () ()) (11 () ()))) (5 () (9 (4 () ()) ())))'
const tokenizer = input => {
let current = 0
const tokens = []
while (current < input.length) {
let char = input[current]
@sidoshi
sidoshi / fib.rs
Created August 10, 2019 18:40
Fibonacci in Rust
use std::env;
use num_bigint::{BigUint, ToBigUint};
fn fib(n: usize) -> BigUint {
let mut dp = Vec::with_capacity(n+1);
dp.push(0.to_biguint().unwrap());
dp.push(1.to_biguint().unwrap());
for i in 2..=n {
@sidoshi
sidoshi / callstack-context.ts
Created July 30, 2020 14:22
A React context-like implementation for functions
const contextStore: any = {};
const prefix = '____FREIGHTHUB_CONTEXT_PROVIDER____';
export async function runInContext(
callback: () => Promise<void>,
context: any
) {
const id = 'some-random-id';
const rootFnName = `${prefix}${id}--end`;
@sidoshi
sidoshi / .gitignore
Last active August 22, 2022 11:08 — forked from aimed/README.md
copy-sandbox-env
node_modules/
@sidoshi
sidoshi / workout-plan.md
Last active December 20, 2023 14:02
Workout plan

Weekly Workout Plan with Calisthenics Skill Progression

Day 1: Upper Body Strength + Handstand Progression

  • Handstand Progression

  • Pull-ups
  • Overhead Press
  • Dips