Skip to content

Instantly share code, notes, and snippets.

View ph4r5h4d's full-sized avatar
🏠
Working from home

Farshad Nematdoust ph4r5h4d

🏠
Working from home
View GitHub Profile
@ph4r5h4d
ph4r5h4d / .aliases
Last active June 13, 2021 13:32
Useful zsh aliases
alias dc="docker compose"
alias k="kubectl"
alias d="docker"
alias gc="gcloud"
# docker related aliases
alias dsp="docker system prune -f"
alias dspa="docker system prune -fa"
alias ds="docker stats"
@ph4r5h4d
ph4r5h4d / MySQL-Logging.md
Created December 1, 2020 10:24
Enable MySQL General Query Logging

For enabling the general query logging:

SET global general_log = 1;
SET global log_output = 'table'

For disabling:

SET global general_log = 0;
@ph4r5h4d
ph4r5h4d / docker-image-management
Created June 24, 2019 08:22
docker remove images
remove dangling images `docker images -f "dangling=true" -q`
clean image repository `docker image prune`
remove <none> images `docker rmi --force $(docker images | grep "^<none" | awk '{print $3}')`
@ph4r5h4d
ph4r5h4d / docker-container-run-like-in-OKD
Last active March 9, 2020 09:22
Run docker container like it runs in OKD
docker run -t -i --user=100450 --group-add=100450 --rm nginx

Keybase proof

I hereby claim:

  • I am ph4r5h4d on github.
  • I am ph4r5h4d (https://keybase.io/ph4r5h4d) on keybase.
  • I have a public key ASAo3-gitYKavUoBY38-VIsDtWrbKUNlxrsWMqCQbay_Wgo

To claim this, I am signing this object: