Skip to content

Instantly share code, notes, and snippets.

View Edmartt's full-sized avatar
💭
Looking for knowledge

Edmartt Edmartt

💭
Looking for knowledge
View GitHub Profile
@Edmartt
Edmartt / export-kubeconfig-from-aks
Created May 12, 2023 14:43 — forked from dcasati/export-kubeconfig-from-aks
Export KUBECONFIG from AKS
az aks get-credentials --resource-group k8s-demo-ss --name k8s-demo-cluster-ss --file kubeconfig-ss
@Edmartt
Edmartt / file-upload-multipart.go
Created January 28, 2023 01:58 — forked from andrewmilson/file-upload-multipart.go
Golang multipart/form-data File Upload
package main
import (
"net/http"
"os"
"bytes"
"path"
"path/filepath"
"mime/multipart"
"io"
@Edmartt
Edmartt / docker-volumes.md
Created April 23, 2022 23:23 — forked from onlyphantom/docker-volumes.md
Demystifying Docker Volumes for Mac and PC Users

Demystifying Docker Volumes for Mac and PC Users

  1. Docker runs on a Linux kernel

Docker can be confusing to PC and Windows users because many tutorials on that topic assume you're using a Linux machine.

As a Linux user, you learn that Volumes are stored in a part of the host filesystem managed by Docker, and that is /var/lib/docker/volumes. When you're running Docker on a Windows or Mac OS machine, you will read the same documentation and instructions but feel frustrated as that path don't exist on your system. This simple note is my answer to that.

When you use Docker on a Windows PC, you're typically doing one of these two things:

  • Run Linux containers in a full Linux VM (what Docker typically does today)
@Edmartt
Edmartt / zshrc
Created December 25, 2021 09:15 — forked from LukeSmithxyz/zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@Edmartt
Edmartt / API.md
Created August 5, 2021 05:04 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@Edmartt
Edmartt / python_tests_dir_structure.md
Created April 29, 2021 10:01 — forked from tasdikrahman/python_tests_dir_structure.md
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

├── antigravity.py