Skip to content

Instantly share code, notes, and snippets.

View mstrYoda's full-sized avatar
🎧
Developing platform infrastructure. Microservices, CNCF, Kubernetes <3

Emre Savcı mstrYoda

🎧
Developing platform infrastructure. Microservices, CNCF, Kubernetes <3
View GitHub Profile
@developer-guy
developer-guy / cross-build
Created November 23, 2020 07:29
cross-build
$ cat Makefile
cross-build:
@docker buildx create --name mybuilder --use
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${PROD_IMAGE} --push ./app
$ BUILDX_BINARY_URL="https://github.com/docker/buildx/releases/download/v0.4.2/buildx-v0.4.2.linux-amd64"
$ curl --output docker-buildx \
--silent --show-error --location --fail --retry 3 \
"$BUILDX_BINARY_URL"
$ mkdir -p ~/.docker/cli-plugins
@JosimarCamargo
JosimarCamargo / README.md
Last active April 6, 2024 15:39
How to setup a Postgres replication with docker and docker-compose

How to setup a Postgres replication with docker and docker-compose

How to use

To run you will need docker and docker-compose installed, and run the command docker-compose up on a folder within this file named docker-compose.yml(attached in this Gist)

How the PGAudit is enable, you will see the queries log and in which database is running which query, this is the main purpose of this Gist, along with have a database with replication working out of the box

To add user with just reading rights to access the database on slave replica

@CJEnright
CJEnright / gzip.go
Last active July 1, 2024 21:17
Idiomatic golang net/http gzip transparent compression, an updated version of https://gist.github.com/bryfry/09a650eb8aac0fb76c24
package main
import (
"net/http"
"compress/gzip"
"io/ioutil"
"strings"
"sync"
"io"
)
@Ryanb58
Ryanb58 / install.md
Last active June 25, 2024 19:59
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
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
@ruanbekker
ruanbekker / cheatsheet-elasticsearch.md
Last active April 24, 2024 00:11
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@lukas-h
lukas-h / license-badges.md
Last active July 11, 2024 07:00
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@gosuri
gosuri / terraformer.go
Created September 4, 2015 18:28
Using terraform with go
package terraformer
import (
"bytes"
"errors"
"path"
"path/filepath"
"...runtime"
"...store"
@jefferai
jefferai / gist:e2bebc3bb97fed521666
Last active May 20, 2022 13:29
Example of Vault PKI (X509) backend issuing certificates to client and server, which then perform TLS mutual auth
package main
import (
"crypto/tls"
"fmt"
"html"
"io/ioutil"
"log"
"net"
"net/http"
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 15, 2024 21:14
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k