- A Fly.io account
- Fly.io's CLI is installed on your machine
- Prerequisites in the repository
- An OpenAI account and API key (note: this is pay as you go).
- Telegram, a Telegram bot, and its token.
- Python 3.10 and pipenv (optional, only if you want to edit the bot locally)
John Belmonte, 2022-Sep
I've started writing a toy structured concurrency implementation for the Lua programming language. Some motivations:
- use it as a simple introduction to structured concurrency from the perspective of Lua (this article)
- learn the fundamental properties of structured concurrency and how to implement them
- share code that could become the starting point for a real Lua library and framework
So what is structured concurrency? For now, I'll just say that it's a programming paradigm that makes managing concurrency (arguably the hardest problem of computer science) an order of magnitude easier in many contexts. It achieves this in ways that seem subtle to us—clearly so, since its utility didn't reach critical mass until around 2018[^sc_birth] (just as control structures like functions, if
, and while
weren't introduced to languages until long after the first compu
# Bazarr downloads subtitles | |
version: "3.4" | |
services: | |
bazarr: | |
image: linuxserver/bazarr:1.0.5-development | |
container_name: bazarr | |
restart: unless-stopped | |
environment: | |
- TZ=Europe/London |
# to add to your ~/.bashrc or your ~/.zshrc file. Usage: $ go switch 1.18.1 | |
function go() { | |
case $* in | |
switch* ) | |
shift 1 | |
gobindir=$(go env GOBIN) | |
# adapt to a valid directory at the beginning of your $PATH if you're not on systemd | |
homebindir=$(systemd-path user-binaries) | |
go install golang.org/dl/go"$@"@latest | |
$gobindir/go"$@" download |
Example of a storage agnostic schema layer that can drive queries, graphql, privacy, mutations and other concerns. We'll call it Ent (short for entity).
A Facebook team from Tel Aviv did open-source an Ent framework for Go. It is heavily inspired by the framework used by the rest of the company except that EntGo:
- Only supports Go as a target language
- Only supports SQL and Gremlin as backends
- Schema definitions are written in Go rather than a DSL or something like Yaml.
I never got around to asking them why they didn't use the existing framework.
<%* /*
*/
const view = app.workspace.activeLeaf.view;
const editor = view.editor;
const curLineNum = editor.getCursor().line;
const curLineText = editor.getLine(curLineNum);
const title = tp.file.title;
const today = title.match(/\d{4}\-\d{2}\-\d{2} .+/) //are we on the DNP?
/* Ultra lightweight Github REST Client */ | |
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const token = 'github-token-here' | |
const githubClient = generateAPI('https://api.github.com', { | |
headers: { | |
'User-Agent': 'xyz', | |
'Authorization': `bearer ${token}` | |
} | |
}) |
### | |
# SSH keys setup with Apple keychain | |
### | |
if [ -z "$SSH_AUTH_SOCK" ] && [ -z "$SSH_AGENT_PID" ]; then | |
# If no SSH Agent is running, start one and load keys from Apple keychain | |
eval `ssh-agent -s` &> /dev/null | |
ssh-add --apple-load-keychain &> /dev/null | |
else | |
if [ -z "$(ssh-add -l | grep SHA256)" ]; then | |
# If agent is running but has no keys, load keys from Apple keychain |
# [🟨OPTIONAL] Uninstall old docker versions | |
sudo apt-get remove docker docker-engine docker.io containerd runc | |
# Refresh latest version | |
sudo apt-get update | |
# Install pre-req | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg \ |