Skip to content

Instantly share code, notes, and snippets.

View astuyve's full-sized avatar

AJ Stuyvenberg astuyve

View GitHub Profile
@richardartoul
richardartoul / goroutine_pool.go
Created July 24, 2023 14:15
A simple Goroutine pool for amortizing stack growth overhead
package pool
import (
"fmt"
"sync"
"runtime"
)
// GoroutinePool pools Goroutines to avoid performance penalties associated with spawning many
// short-lived goroutines that each have to individually grow their stack.
@dnaprawa
dnaprawa / README.md
Last active June 10, 2024 17:09
Using Docker on remote Docker Host with docker context

Working on remote Docker Host using docker context

SSH keys on Windows

In order to use remote Docker host, as a prerequisite you need SSH enabled (required login using SSH keys).

Generate or find your public SSH key

Go to C:\Users\YOUR_USERNAME\.ssh and copy content of id_rsa.pub file

@aelbore
aelbore / esm-cjs-modules.md
Last active May 5, 2024 03:07
Publish your npm package as ES Module, and backward compatibility CommonJS

Create your library

  • Initialize project npm init -y
  • Create esm module ./src/esm/my-lib.js
    function addNumber(value, value2) {
      return value + value2;
    }
    
    export { addNumber };
@revmischa
revmischa / serverless.yml
Last active April 11, 2019 10:21
Serverless CloudFormation to provide private RDS and lambda networking with internet access in VPC.
plugins:
- serverless-pseudo-parameters
provider:
name: aws
runtime: python3.7
stage: ${opt:stage, 'dev'}
environment:
SQLALCHEMY_DATABASE_URI: # DB DSN