Skip to content

Instantly share code, notes, and snippets.

@andreswebs
andreswebs / signal.go
Created December 15, 2020 10:42 — forked from reiki4040/signal.go
signal handling example for golang
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
)
func main() {
@andreswebs
andreswebs / golang-dockerfile-from-scratch.md
Created December 15, 2020 02:19
Example Dockerfile for a non-privileged Go application `FROM scratch`

Golang Dockerfile FROM scratch

FROM golang:alpine as builder
RUN \
  mkdir /build && \
  echo "app:x:10001:10001:app:/app:/bin/false" > /app-user && \
  echo "app:x:10001:" > /app-group
COPY src/* /build/
WORKDIR /build
import * as qs from "qs";
import { PathLike } from "fs";
export const apiConfig = {
returnRejectedPromiseOnError: true,
withCredentials: true,
timeout: 30000,
baseURL: "https://jsonplaceholder.typicode.com/",
headers: {
common: {
@andreswebs
andreswebs / keybase.md
Created January 25, 2019 12:16
Keybase identity proof

Keybase proof

I hereby claim:

  • I am andreswebs on github.
  • I am andreswebs (https://keybase.io/andreswebs) on keybase.
  • I have a public key ASCm8ZBq-D52q-dZgrnvSRd39CPb0LQe4qmDH0H6l5lyLAo

To claim this, I am signing this object: