Skip to content

Instantly share code, notes, and snippets.

mattetti / multipart_upload.go
Last active Jan 20, 2022
Example of doing a multipart upload in Go (golang)
View multipart_upload.go
package main
import (
m-radzikowski /
Last active Jan 20, 2022
Minimal safe Bash script template - see the article with full description:
#!/usr/bin/env bash
set -Eeuo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

Saissaken / Update git fork with
Last active Jan 20, 2022
Update git fork with tags
View Update git fork with
# Repo: someuser/myframework
# Fork: superteam/myframework
# Track:
git clone
cd myframework
git remote add upstream
# Update:
git fetch upstream
Ryanb58 /
Last active Jan 19, 2022
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
v3.7.0-243-gf26e75a186 []
v3.7.0-229-g087f28e29d []
andrewmilson / file-upload-multipart.go
Last active Jan 13, 2022
Golang multipart/form-data File Upload
View file-upload-multipart.go
package main
import (
matthewpalmer / pod.yaml
Last active Jan 12, 2022
Example Kubernetes pod for the multi-container sidecar design pattern
View pod.yaml
# Example YAML configuration for the sidecar pattern.
# It defines a main application container which writes
# the current date to a log file every five seconds.
# The sidecar container is nginx serving that log file.
# (In practice, your sidecar is likely to be a log collection
# container that uploads to external storage.)
# To run:

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
peterforgacs /
Last active Jan 10, 2022
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.

View golang convert interface to map
package main
import (
func main() {
b := []byte(`{"key":"value"}`)