Skip to content

Instantly share code, notes, and snippets.

View fojuth's full-sized avatar

Kamil fojuth

  • DeSmart
  • Gdynia, Poland
View GitHub Profile
@fojuth
fojuth / .gitconfig
Last active December 8, 2017 21:51
[alias]
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=default
cp = cherry-pick
s = status
cl = clone
c = commit -m
co = checkout
cob = checkout -b
@fojuth
fojuth / rm-none-docker
Created November 10, 2016 20:41
Remove <none> Docker images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
Run GrumPHP via Docker container instead of local env.
-- .git/hooks/pre-commit
(cd "./" && printf "%s\n" "${DIFF}" | docker-compose -f docker-compose.local.yml run api vendor/phpro/grumphp/bin/grumphp git:pre-commit --skip-success-output)
-- .git/hooks/commit-msg
(cd "./" && printf "%s\n" "${DIFF}" | docker-compose -f docker-compose.local.yml run api vendor/phpro/grumphp/bin/grumphp git:commit-msg "--git-user=$GIT_USER" "--git-email=$GIT_EMAIL" "$COMMIT_MSG_FILE")
# List docker containers and their IPs
docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
docker rm $(docker ps -a -q)
alias docker-bash-api='docker exec -it $(docker ps | grep api | awk '\''{print $1}'\'') bash'
alias docker-bash-www='docker exec -it $(docker ps | grep www | awk '\''{print $1}'\'') bash'
@fojuth
fojuth / gist:5ba7da9b876a4d009ab2
Created September 4, 2015 09:08
Emoji support in MySQL
http://www.saturngod.net/articles/emoji-with-mysql/
{
    "body": {
        "client": {
            "name": "keybase.io node.js client",
            "version": "0.7.3"
        },
        "key": {
 "fingerprint": "b06fb3d84098936d4f8e283e3f856f90c9051fde",