Skip to content

Instantly share code, notes, and snippets.

View Oyelowo's full-sized avatar

Oyelowo

View GitHub Profile
@Oyelowo
Oyelowo / grokking_to_leetcode.md
Created September 17, 2023 18:10 — 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

@Oyelowo
Oyelowo / tmux-cheat-sheet.md
Created February 13, 2023 16:06 — forked from michaellihs/tmux-cheat-sheet.md
tmux Cheat Sheet
@Oyelowo
Oyelowo / README.md
Created June 25, 2022 12:37 — forked from exupero/README.md
Alias a domain to a local port (Mac)

I run a lot of web servers for different projects, all of them on different ports. Generally I start with port 8000 and increment from there as I spin up new servers, but it became tiresome to remember what projects were running on which ports and what the next available port was.

/etc/hosts won't let you specify a port, but a combination of aliasing 127.0.0.1 to 127.0.0.X, forwarding ports from 8000 to 80, and adding the 127.0.0.X IP under an alias in /etc/hosts did work.

This script finds the next available value of X, aliases it with ifconfig, forwards the given port to port 80 with ipfw, and adds a new entry to /etc/hosts that aliases the IP to the domain you want.

Now I can add a server alias with sudo domain-alias funproject 8000, run the web server at 127.0.0.X:8000, and load up http://funproject/ in my browser.

(Because I needed it to work on a Mac, I couldn't use iptables. ipfw seems to work, though its manpage claims it's deprecated and pfctl is the way to go. I wasn't able to figure

@Oyelowo
Oyelowo / init.vim
Created May 31, 2022 09:05 — forked from celso/init.vim
Neovim setup for OSX users
syntax on
set ruler " Show the line and column numbers of the cursor.
set formatoptions+=o " Continue comment marker in new lines.
set textwidth=0 " Hard-wrap long lines as you type them.
set modeline " Enable modeline.
set esckeys " Cursor keys in insert mode.
set linespace=0 " Set line-spacing to minimum.
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
" More natural splits
set splitbelow " Horizontal split below current.
@Oyelowo
Oyelowo / linux_users_management.md
Created March 27, 2022 07:04 — forked from AjeetK/linux_users_management.md
User Management in Linux

Types of user:

  1. Root User - It is the super user which can run any command generally used for administration.
  2. System User - Users needed for system specific operation/components, like mysql user to run mysql.
  3. Normal User - Other users which are created by root and have limited access given to them.

Attributes:

  1. User Type: Super user
  2. User Name: root
@Oyelowo
Oyelowo / App.js
Created November 17, 2021 05:54 — forked from ben-rogerson/App.js
A breakpoint provider that syncs up with your screens in tailwind.config.js. Common use is to fully remove elements from the dom rather than hide them with css.
import React from 'react';
import { useMinScreen } from './minScreen';
const App = () => {
const { min } = useMinScreen();
return (
<>
{min`md` && <div>I'll show at md and up</div>}
{!min`lg` && <div>I'll show at up to lg</div>}
@Oyelowo
Oyelowo / webdev_online_resources.md
Created July 17, 2018 05:38 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)