My tmux config. Tokyo Night color scheme, top status bar with system stats, Emacs-style copy mode, and fzf session switching.
See the new site: https://postgresisenough.dev
What to evaluate and consider before adding usage of new third-party crates.
These are not exact requirements but questions to investigate and discuss to help reason around the health, safety, maintainability, and more around crates.
This can also be read as an opinionated guide for crate authors of what our (Embark's) guidelines and recommendations are, though should not be taken too literally.
Legend: 🔒 Must have, ⭐️ Should have, 👍 Nice to have, ℹ️ Info
| THIS GIST IS OUT OF DATE! Please use my new project template here to get started with Zig on Playdate: | |
| https://github.com/DanB91/Zig-Playdate-Template | |
| The rest of this is preservied for historical reasons: | |
| This is a small snippet of some code to get you started for developing for the Playdate on Zig. This code should be used as a starting point and may not compile without some massaging. This code has only been tested out on macOS and you'll need to modify the addSharedLibrary() portion of build.zig to output a .dll or .so instead of a .dylib, depending on you platform. | |
| This code will help you produce both an executable for the Playdate simulator and also an executable that actually run on the Playdate hardware. |
Everyone who interacts with computers has in important ways always already been programming them.
Every time you make a folder or rename a file on your computer, the actions you take through moving your mouse and clicking on buttons, translate into text-based commands or scripts which eventually translate into binary.
Why are the common conceptions of programmer and user so divorced from each other? The distinction between programmer and user is reinforced and maintained by a tech industry that benefits from a population rendered computationally passive. If we accept and adopt the role of less agency, we then make it harder for ourselves to come into more agency.
We've unpacked the "user" a little, now let's look at the "programmer." When a programmer is writing javascript, they are using prewritten, packaged functions and variables in order to carry out the actions they want their code to do. In this way, the programmer is also the user. Why is using pre-made scripts seen
Quite a lot of different people have been on the same trail of thought. Gary Bernhardt's formulation of a "functional core, imperative shell" seems to be the most voiced.
"Imperative shell" that wraps and uses your "functional core".. The result of this is that the shell has fewer paths, but more dependencies. The core contains no dependencies, but encapsulates the different logic paths. So we’re encapsulating dependencies on one side, and business logic on the other side. Or put another way, the way to figure out the separation is by doing as much as you can without mutation, and then encapsulating the mutation separately. Functional core — Many fast unit tests. Imperative shell — Few integration tests
| // Download all the custom emoji your slack team have created! | |
| // Start by going to the "Customize Emoji" screen for your Slack team. | |
| // Open up a browser console and run the following JS | |
| var pattern = new RegExp("https://emoji.slack-edge.com/.*?/([^/]+?)/[^/]+(\.png|jpg|gif)"); | |
| function link_text (url) { | |
| var match = pattern.exec(url); | |
| if (match) { |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| const int BUFSIZE = 1024; | |
| const int ARBITRARY_THRESHOLD = 3; | |
| int is_uppercase(char ch) { | |
| return ch >= 'A' && ch <= 'Z'; | |
| } |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
| #!/bin/bash | |
| for song in $(find ~ -iname *.mp3) | |
| do | |
| title=$(id3info $song | awk -F ':' '/TIT2/{print $NF}') | |
| id3tag -s "$title (feat. Minions)" $song | |
| done |