Skip to content

Instantly share code, notes, and snippets.

View douglasmiranda's full-sized avatar
👽

Douglas Miranda douglasmiranda

👽
  • Earth, Brazil
View GitHub Profile
@douglasmiranda
douglasmiranda / wkhtmltopdf.md
Created November 23, 2020 20:19
wkhtmltopdf headless fix
@douglasmiranda
douglasmiranda / choices.md
Created January 4, 2020 17:00
Django Field.choices alternative

Django Field.choices

I was never very fond of using that tuple of tuples and acessing those choices with something like choices[0].

In my latest projects I was using a solution of my own.

This:

@douglasmiranda
douglasmiranda / docker-client-go.md
Created May 8, 2019 02:52
Docker client API version mismatch: Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39

When building things that will interact with the client/server you can have a mismatch of API versions.

This is a common way to get started with the Docker client in Go: (this will create a new client based on your environment settings for Docker)

cli, err := client.NewClientWithOpts(client.FromEnv)

You may face an error similar to:

package main
import (
"context"
"fmt"
"io/ioutil"
"os"
"github.com/containerd/containerd/content/local"
"github.com/containerd/containerd/images"
@douglasmiranda
douglasmiranda / ubuntu-dell-g3.md
Last active March 2, 2023 21:16
Ubuntu 16.04 Dell G3 series setup
PYTHON
https://github.com/thumbor/thumbor
https://github.com/ufoym/cropman
https://github.com/agschwender/pilbox
JS
https://github.com/jwagner/smartcrop.js
GO
https://github.com/DarthSim/imgproxy
- https://github.com/thumbor/thumbor
- https://github.com/thumbor-community/aws
- https://github.com/Starou/django-thumborstorage
- https://github.com/ricobl/django-thumbor