Skip to content

Instantly share code, notes, and snippets.

View guptarohit's full-sized avatar
BRB; If something urgent, feel free to reach out on X (twitter)

Rohit Gupta guptarohit

BRB; If something urgent, feel free to reach out on X (twitter)
View GitHub Profile
adtac / Dockerfile
Last active May 28, 2024 01:38
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
RUN npm install sqlite3
Adrian-2105 /
Last active March 2, 2024 23:24
Script to auto-install my ZSH basic settings
if [[ $EUID -eq 0 ]]; then
echo "This script must not be executed using sudo directly. Exiting..."
exit 1
linkdd / hackernews-new-comms.js
Last active September 20, 2021 22:52
Add a bell emoji to unread comments on HackerNews
// Can be used with
// This snippet is released under the terms of the CC0 license:
const cache_key = 'hn_comments_views'
const cache = JSON.parse(localStorage.getItem(cache_key) || '{}')
document.querySelectorAll('.athing.comtr').forEach(comm => {
if (!cache[]) {
const span = document.createElement('span')
span.innerHTML = '🔔' // :bell: emoji
kepano / obsidian-web-clipper.js
Last active July 14, 2024 05:13
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import(''), import(''), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
davidteren /
Last active July 12, 2024 21:14
Install Nerd Fonts via Homebrew [updated & fixed]
trumad /
Last active September 11, 2023 12:10
See multiple tradingview windows side by side, hopefully without ads and popups.
# First install webview:
# pip install pywebview
# Then create a config.json file in the same folder with the following options:
ih2502mk /
Last active July 14, 2024 02:11
Quantopian Lectures Saved
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much
fnky /
Last active July 14, 2024 06:20
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
$ cat
from pprint import pprint
from pytheory import Tone, Fretboard, charts_for_fretboard

tones = (