Skip to content

Instantly share code, notes, and snippets.

View navaz-alani's full-sized avatar
:shipit:

Navaz Alani navaz-alani

:shipit:
View GitHub Profile

Keybase proof

I hereby claim:

  • I am navaz-alani on github.
  • I am navaz (https://keybase.io/navaz) on keybase.
  • I have a public key ASCCXEKWn8gwQF6maSsfrzNWNmuQLnbZNxsZsXpo_UjwzAo

To claim this, I am signing this object:

@navaz-alani
navaz-alani / arch-artix-install.md
Last active December 16, 2021 15:23
Arch/Artix Linux Installation

Arch/Artix Linux Base Installation

Prepare Installation Media

  • Download the (base) ISO image and create a bootable flash drive
    • Figure out the disk's name on your system; be careful to get this correct otherwise you can very easily destory your current system
      • on Linux, use lsblk to figure out which disk to use
      • on MacOS, use diskutil list to figure out which disk to use
  • make sure you use the disk name, not a partition
@navaz-alani
navaz-alani / lis.cc
Created February 1, 2021 20:03
Dynamic Programming - Longest Increasing Sequence (C++)
/*
* Dynamic programming practice question - Longest Increasing Subsequence (LIS)
*/
#include <map>
#include <vector>
#include <utility>
#include "utils.h"
@navaz-alani
navaz-alani / inception_dream_time.py
Created January 24, 2021 13:04
Inception Dream Time
# `dream_time` returns the amount of dream time elapsed in a dream at `level_depth`
# under a sedative factor of `sedative_factor` while sleeping for `base_time` amount
# of time. The units of `base_time` are seconds, and the returned dream time is also
# in seconds, which can be converted as desired.
#
# Tested with the dream time calculations in Inception (the movie).
# e.g. the sedative made by Yusuf apparently has a factor of 20.
def dream_time(base_time, level_depth, sedative_factor):
factor = 0
for i in range(1, level_depth+1):
@navaz-alani
navaz-alani / .vimrc
Last active March 18, 2020 02:46
Setup scripts to install applications and customize a fresh OS X install.
" Do not use Vi compatibility settings
set nocompatible
" Use utf-8 if Vim was compliled with multi-byte support
if has("multi_byte")
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
setglobal fileencoding=utf-8