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
| ```sql | |
| SELECT | |
| json_agg( | |
| json_build_object( | |
| 'first_name', u.first_name, | |
| 'last_name', u.last_name, | |
| 'email', u.email | |
| ) | |
| ) FROM users AS u | |
| ``` |
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
| ```python | |
| class Journal: | |
| def __init__(self, date): | |
| self.date = date | |
| class Meeting(Journal): | |
| def __init__(self, date, time): | |
| super().__init__(date) | |
| self.time = time |
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
| 1. Fold / Unfold | |
| 1. z c → fold | |
| 2. z o → unfold | |
| 3. z r → open recursively | |
| 2. Find + Replace | |
| 1. S s p | |
| 2. C c + C e | |
| 3. :%s/<WORD>/<UPDATED WORD> | |
| 4. C c + C c | |
| 3. Minimap |
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
| α - Α → alpha | |
| β - Β → beta | |
| γ - Γ → gamma | |
| δ - Δ → delta | |
| ε - Ε → epsilon | |
| ζ - Ζ → zeta | |
| η - Η → eta | |
| θ - Θ → theta | |
| ι - Ι → iota | |
| κ - Κ → kappa |
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
| Print file names | |
| ``` | |
| for f in *.jpg; do echo ${f}; done; |
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
| ```erlang | |
| -module(fact). | |
| % fact module | |
| -export([run/1]). | |
| -spec run(integer()) -> integer(). | |
| run(N) when N > 0 -> | |
| N * run(N-1); |
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
| SPC | |
| SPC: find file | |
| , switch buffer | |
| . browse files | |
| : MX | |
| ; EX | |
| < switch buffer | |
| ` eval | |
| u universal arg | |
| x pop up scratch |
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
| -module(all_atoms). | |
| -export([all_atoms/0]). | |
| atom_by_number(N) -> | |
| binary_to_term(<<131,75,N:24>>). | |
| all_atoms() -> | |
| atoms_starting_at(0). |
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
| { | |
| "title": "Erlang Atoms", | |
| "description": "", | |
| "visuals": [ | |
| { | |
| "title": "Atom usage", | |
| "description": "Usage of atoms in Erlang and the configured limit.", | |
| "line_label": "%name% %hostname%-%type%", | |
| "display": "LINE", | |
| "format": "number", |
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 webSocket = new WebSocket('wss://echo.websocket.org'); | |
| //Event listeners are the pillars upon which WebSockets are built. This event fires when the WebSocket is considered 'OPEN', | |
| //which means that it has connected successfully. | |
| webSocket.addEventListener('open', function(event) { | |
| console.log('websocket connected successfully') //log this into the browser console so we can check if the websocket connected | |
| }); | |
| //This is a global reference to the websocket that we created. We need this because otherwise multiple JS |
OlderNewer