Skip to content

Instantly share code, notes, and snippets.

View heffcodex's full-sized avatar
⚒️
Arbeiten

Vladislav Kolesnichenko heffcodex

⚒️
Arbeiten
View GitHub Profile
@wallyqs
wallyqs / cert-manager.yaml
Created June 25, 2020 20:56
NATS Helm Charts + Cert Manager
---
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: selfsigning
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
@lucasrenan
lucasrenan / k8s.sh
Created April 30, 2019 17:50
Kubernetes get all pods/containers resources requests/limits
kubectl get pods --all-namespaces --sort-by='.metadata.name' -o jsonpath='{.items[*].spec.containers[*].resources.limits.memory}'
kubectl get pod --all-namespaces --sort-by='.metadata.name' -o json | jq -r '[.items[] | {pod_name: .metadata.name, containers: .spec.containers[] | [ {container_name: .name, memory_requested: .resources.requests.memory, cpu_requested: .resources.requests.cpu} ] }]'

Building pgModeler in MacOS with Homebrew

The official installation instructions for pgModeler recommends installing Xcode and the Enterprise DB distribution of Postgres to fulfill its build requirements. Luckily, Homebrew's got us covered!

  1. Checkout the source

    git clone https://github.com/pgmodeler/pgmodeler.git
    
@javilobo8
javilobo8 / download-file.js
Last active May 27, 2024 21:00
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@scmx
scmx / docker-prompt.md
Last active January 19, 2024 21:36
How to get a fancier bash prompt PS1 inside a docker container #docker #ps1 #emoji

How to get a fancier bash prompt PS1 inside a docker container

Today I wanted to make a recording of me running some commands inside a docker-container.

❯ docker-compose run app bash
root@e9bb2af4dc11:/usr/local/go/src/example.com/dev/project#

Needless to say it looked a bit bland with no colors and a long prompt that prevents me from recording a small terminal and show the full commands I'm