Skip to content

Instantly share code, notes, and snippets.

View burritoOverflow's full-sized avatar
💭
Hungry, presumably.

burritoOverflow

💭
Hungry, presumably.
  • 07:07 (UTC -04:00)
View GitHub Profile
#!/usr/bin/env bash
if ! command -v gh &> /dev/null || ! command -v jq &> /dev/null
then
echo "requires both gh and jq"
exit 1
fi
if [ -z "$1" ]
then
@burritoOverflow
burritoOverflow / .vimrc
Last active March 14, 2023 18:17
Minimal .vimrc
packadd! dracula
syntax enable
colorscheme dracula
set relativenumber
set number
set showmode
set title
set mouse=a
set ignorecase
set incsearch
@burritoOverflow
burritoOverflow / .tmux.conf
Last active January 25, 2023 04:45
Simple Tmux configuration - adapted from Prag Prog's Tmux 2 Book
set -g default-terminal "screen-256color"
# set base index to windows to 1
set -g base-index 1
# set base index for panes to 1
setw -g pane-base-index 1
# reload the config file with Prefix-r
bind r source-file ~/.tmux.conf
# vertical and horizontal splits
bind | split-window -h
bind - split-window -v
@burritoOverflow
burritoOverflow / grokking_to_leetcode.md
Created September 10, 2022 17:35 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

#include <list>
#include <algorithm>
#include <iostream>
using namespace std;
template <class T>
typename list<T>::iterator _erase(list<T> &l, const T &val)
{
auto it = find(l.begin(), l.end(), val);
if (it == l.end())
#include <set>
#include <vector>
#include <iterator>
#include <iostream>
using namespace std;
struct even_compare
{
bool operator()(const int &lhs, const int &rhs) const
{
import csv
import sys
if len(sys.argv) is not 2:
print("Filename argument required")
exit(1)
else:
customers_dict = dict()
with open(sys.argv[1], 'r', newline='') as csv_file:
# skip the first line