Skip to content

Instantly share code, notes, and snippets.

View ryan6416's full-sized avatar

Ryan ryan6416

View GitHub Profile
@ryan6416
ryan6416 / vimium-c.json
Last active January 17, 2023 03:21
vimium-c
{
"name": "Vimium C",
"@time": "1/16/2023, 7:21:09 PM",
"time": 1673925669879,
"environment": {
"extension": "1.99.97",
"platform": "mac",
"chromium": 109
},
"allBrowserUrls": true,
@ryan6416
ryan6416 / karabiner.json
Last active January 14, 2023 06:37
karabiner
{
"global": {
"ask_for_confirmation_before_quitting": true,
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false,
"unsafe_ui": false
},
"profiles": [
{
@ryan6416
ryan6416 / spaced-repetition.js
Last active December 6, 2022 01:52
obsidian
This file has been truncated, but you can view the full file.
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
@ryan6416
ryan6416 / grokking_to_leetcode.md
Created October 18, 2022 00: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

@ryan6416
ryan6416 / start_focus.sh
Last active May 24, 2023 17:13
heyfocus
#!/bin/bash
open focus://unfocus
open focus://focus?minutes={query}
---
open "raycast://extensions/peduarte/1-click-confetti/index"
eval "$(/opt/homebrew/bin/brew shellenv)"
spotify play uri spotify:playlist:0LRFos3cYe1c3s5vErcwzF
shortcuts run "DND on"
@ryan6416
ryan6416 / next-song.applescript
Last active July 19, 2022 01:47
applescript_youtube_music_control_for_chrome
on run argv
tell application "Google Chrome"
set allWins to every window
set allTabs to {}
repeat with currWin in allWins
set allTabs to allTabs & every tab of currWin
end repeat
repeat with currTab in allTabs
try
if (title of currTab) contains "Youtube Music" then set musicTab to currTab
{"durations":[3,1800,1,0,9,1800,10,0,4,1800,2,0,1,900,1,0,4,1800,1,0,4,1800,1,0,8,1800,1,0,1,1800,1,0,4,1800,1,0,1,1800,1,0,1,1620,8,1800,3,1680,3,1800,1,0,1,1800,2,0,1,3600,1,1800],"pomodoros":[27246551,27246586,27247968,27250526,27253479,27253581,27253617,27255033,27258024,27258068,27260316,27260416,27260468,27262420,27262420,27262420,27262420,27262420,27262420,27262420,27262420,27262420,27262420,27263614,27263647,27263677,27266691,27266739,27267334,27267893,27267925,27267972,27268010,27268045,27268098,27268176,27273774,27273809,27273861,27273940,27273971,27276611,27276645,27278216,27278261,27282431,27284537,27284572,27284619,27297872,27297993,27299885,27300979,27301060,27303865,27304130,27304175,27304210,27305339,27305383,27308456,27309693,27315446,27315605,27324232,27324285,27325687,27325737,27325792,27325820,27325848,27328579,27328631,27328702,27328728,27329473,27332640,27335132,27335735,27335807],"timezones":[36,420,44,480],"version":1}
@ryan6416
ryan6416 / README.md
Created December 17, 2021 06:07
Node JS Event Loop

Try the event loop code for yourself and see how modifying the loop timing or moving items around affects the output to console.

run node ordered.js to run the eventloop in order file.

run node random.js to run the eventloop out of order file.

export POSTGRES_PASSWORD=$(kubectl get secret --namespace payments-pr-471 postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
kubectl port-forward --namespace payments-pr-471 svc/postgresql 5432:5432
export REDIS_PASSWORD=$(kubectl get secret --namespace payments redis -o jsonpath="{.data.redis-password}" | base64 --decode)
kubectl port-forward --namespace payments svc/redis-master 6379:6379