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
| services: | |
| postgres: | |
| image: docker.io/library/postgres:16.10-alpine3.22 | |
| restart: always | |
| ports: | |
| - "5433:5432" | |
| environment: | |
| POSTGRES_USER: kevin | |
| POSTGRES_PASSWORD: hunter2 | |
| POSTGRES_DB: postgres |
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
| [ | |
| { | |
| // if you want this to work with Windows Terminal, WT must be configured to have default dir to be "%__CD__%" | |
| "key": "alt+`", | |
| "command": "workbench.action.terminal.openNativeConsole", | |
| "when": "!terminalFocus" | |
| }, | |
| { | |
| "key": "ctrl+alt+p", | |
| "command": "workbench.action.openRecent" |
-
How would you attain a reference to a DOM node on the page with the id, 'foo', without using jQuery?
- document.getElementById('foo') or document.querySelector('#foo')
-
How would you make a request to an API endpoint without jQuery?
- use the
fetchAPI, likefetch('/my/url') - or, old-school, use XMLHttpRequest:
var req = new XMLHttpRequest();
- use the
req.open('GET', '/my/url');
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
| ;; keys here https://github.com/jtroo/kanata/blob/main/parser/src/keys/mod.rs | |
| (defcfg | |
| process-unmapped-keys yes | |
| ) | |
| (deflocalkeys-linux | |
| mouseside1 275 | |
| ) |
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
| [Desktop Entry] | |
| Name=cmus | |
| Exec=alacritty --hold --class cmus --title cmus --command cmus | |
| Terminal=false | |
| Type=Application | |
| Icon=/home/kevin/.local/share/applications/cmus.svg | |
| StartupNotify= | |
| StartupWMClass= | |
| X-AppImage-Version= | |
| Comment= |
- Advantages: Store multiple elements, accessing elements is fast with index
- Disadvantages: Adding/removing in the middle is slow because items must be shifted; act of copying new array is O(n) because everything must be iterated over
Be mindful about slicing or concatenating arrays in your code. Typically, slicing and concatenating arrays would take O(n) time. Use start and end indices to demarcate a subarray/range where possible.
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
| /* | |
| Our local radio station is running a show where the songs are ordered in a very specific way. The last word of the title of one song must match the first word of the title of the next song - for example, "Silent Running" could be followed by "Running to Stand Still". No song may be played more than once. | |
| Given a list of songs and a starting song, find the longest chain of songs that begins with that song, and the last word of each song title matches the first word of the next one. Write a function that returns the longest such chain. If multiple equivalent chains exist, return any of them. | |
| Example: | |
| songs1 = [ | |
| "Down By the River", | |
| "River of Dreams", | |
| "Take me to the River", |
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
Show hidden characters
| [ | |
| { "keys": ["ctrl+shift+t"], "command": "open_recent_file", "args": {"index" : 0} }, | |
| { "keys": ["ctrl+alt+`"], "command": "show_panel", "args": {"panel": "console", "toggle": true} }, | |
| { "keys": ["alt+`"], "command": "open_terminal_project_folder" }, | |
| { "keys": ["ctrl+`"], "command": "open_terminal_project_folder" }, | |
| { "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }, | |
| { "keys": ["alt+right"], "command": "auto_complete_open_link", "context": | |
| [ | |
| { "key": "auto_complete_visible", "operator": "equal", "operand": true }, | |
| ] |
NewerOlder
