Skip to content

Instantly share code, notes, and snippets.

@karl-zylinski
karl-zylinski / odin_book_table_of_contents.txt
Last active January 11, 2025 17:12
Upcoming Odin book table of contents
1: Introduction
1.1: Why learn Odin?
1.2: Overview
1.3: Installing the Odin compiler
1.4: If you get stuck
1.5: Let's go!
2: Hellope! A tiny program
2.1: Compile and run the code
2.2: Line-by-line
@apieceofbart
apieceofbart / test.js
Last active August 20, 2024 23:56
Async testing with jest fake timers and promises
PLEASE CHECK THIS REPO WITH THE EXAMPLES THAT YOU CAN RUN:
https://github.com/apieceofbart/async-testing-with-jest-fake-timers-and-promises
// Let's say you have a function that does some async operation inside setTimeout (think of polling for data)
function runInterval(callback, interval = 1000) {
setInterval(async () => {
const results = await Promise.resolve(42) // this might fetch some data from server
callback(results)
}, interval)
# vim: set ft=ruby
cask_args appdir: '/Applications'
tap 'homebrew/cask'
brew 'mas'
brew 'git'
brew 'zsh'
brew 'make'
@elithrar
elithrar / wale_postgres_recovery.md
Last active May 3, 2021 15:38
WAL-E + Postgres 9.x (single server + DB) Setup and Recovery

A quick "how to" on what you need to do to both setup AND recover a single-server PostgreSQL database using WAL-E

  • WAL-E: https://github.com/wal-e/wal-e
  • Assuming Ubuntu 12.04 LTS ("Precise")
  • We'll be using S3. Make sure you have an IAM in a group with GetObject, ListBucket and PutObject on the bucket you want to use (and that it's not public).

Setup:

  1. These packages: