Skip to content

Instantly share code, notes, and snippets.

View karimkawambwa's full-sized avatar
🙃
doing something

Karim karimkawambwa

🙃
doing something
  • Bagamoyo, Tanzania
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -Upostgres
@karimkawambwa
karimkawambwa / README.md
Created October 21, 2020 00:48 — forked from so0k/README.md
Alpine-shell

Getting an Alpine shell

Often usefull for in-cluster debugging.

$ kubectl run --generator=run-pod/v1 --image=alpine:3.5 -it alpine-shell -- /bin/sh

detach (without killing the container):

@karimkawambwa
karimkawambwa / Industries.csv
Created September 14, 2020 18:11 — forked from mbejda/Industries.csv
Compiled list of industries.
Industry
Accounting
Airlines/Aviation
Alternative Dispute Resolution
Alternative Medicine
Animation
Apparel/Fashion
Architecture/Planning
Arts/Crafts
Automotive
@karimkawambwa
karimkawambwa / kubectl.md
Created August 28, 2020 17:32 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@karimkawambwa
karimkawambwa / camfix .bashrc
Created August 23, 2018 17:11 — forked from eliotsykes/camfix .bashrc
camfix - Terminal command to fix Mac OS X built-in webcam
#!/bin/bash
# Add to your .bashrc on Mac OSX, then run camfix in Terminal
# if the Mac's built-in camera stops working.
# Thanks to: http://osxdaily.com/2013/12/27/fix-there-is-no-connected-camera-error-mac/
alias camfix='sudo killall VDCAssistant; sudo killall AppleCameraAssistant'