You are a teacher of algorithms and data-structures who specializes in the use of the socratic method of teaching concepts. You build up a foundation of understanding with your student as they advance using first principles thinking. Explain the subject that the student provides to you using this approach. By default, do not explain using source code nor artifacts until the student asks for you to do so. Furthermore, do not use analysis tools. Instead, explain concepts in natural language. You are to assume the role of teacher where the teacher asks a leading question to the student. The student thinks and responds. Engage misunderstanding until the student has sufficiently demonstrated that they've corrected their thinking. Continue until the core material of a subject is completely covered. I would benefit most from an explanation style in which you frequently pause to confirm, via asking me test questions, that I've understood your explanations so far. Particularly helpful are test questions related to sim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
CATEGORY="audioteka" | |
function get_mp3_tag() { | |
local file="$1" | |
local tag="$2" | |
ffprobe -v error -show_entries format_tags="$tag" -of default=noprint_wrappers=1:nokey=1 "$file" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const uuid4to7 = (uuid, now = Date.now()) => { | |
const ts = now.toString(16).padStart(12, `0`) | |
return `${ts.slice(0, 8)}-${ts.slice(8)}-7${uuid.slice(15)}` | |
} | |
// generate new UUIDv7 | |
uuid4to7(crypto.randomUUID()) | |
// Conforms to example in the spec RFC9562 A.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================= | |
Railway Oriented Typescript | |
============================= | |
by @robinpokorny | |
*/ | |
/* === 1. Union basics === */ | |
const a: string | number = 42; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const enum InformationalResponse { | |
Continue = 100, | |
SwitchingProtocols = 101, | |
Processing = 102, | |
EarlyHints = 103, | |
} | |
export const enum Success { | |
OK = 200, | |
Created = 201, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fire() { | |
local BRANCH=emergency-`date +%s`-`git config user.email` | |
git checkout -b $BRANCH | |
git add -A | |
git commit -m 'EMERGENCY!' | |
git push -f origin $BRANCH | |
} | |
# Inspired by https://www.reddit.com/r/ProgrammerHumor/comments/3nc531/in_case_of_fire/cvn1k27/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TypeScript Fundamentals For JavaScript Developers | |
/* | |
Tutorial for JavaScript Developers wanting to get started with TypeScript. | |
Thorough walkthrough of all the basic features. | |
We will go through the basic features to gain a better understanding of the fundamentals. | |
You can uncomment the features one by one and work through this tutorial. | |
If you have any questions or feedback please connect via Twitter: | |
A. Sharif : https://twitter.com/sharifsbeat | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
atom-text-editor.editor { | |
.syntax--punctuation.syntax--whitespace.syntax--comment.syntax--leading, | |
.syntax--source { | |
font-family: FiraCode-Retina; // https://github.com/tonsky/FiraCode | |
text-rendering: optimizeLegibility; | |
letter-spacing: 0; | |
} | |
.syntax--string.quoted, | |
.syntax--string.regexp { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"preinstall": "if [[ '$npm_config_user_agent' != *'yarn'* ]]; then echo 'Use Yarn!'; exit 0; fi" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CSS for VS Code */ | |
/* | |
Feel free to remove these comments - just documenting why we do what we do... | |
*/ | |
/* This is the left-hand pane or "tree-view" */ | |
.monaco-split-view, | |
/* These are for any `.js` or `.jsx` files */ | |
.editor-container[data-mode-id~="javascript"], | |
.editor-container[data-mode-id~="javascriptreact"] { |
NewerOlder