Skip to content

Instantly share code, notes, and snippets.

git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all {remote?}
git {pull,push} --all {remote?}
@tiagodevweb
tiagodevweb / nginx-vhost-php.conf
Created July 30, 2022 11:42 — forked from lukearmstrong/nginx-vhost-php.conf
Example vhost config for Nginx (PHP)
server {
listen 80;
server_name .example.co.uk.dev;
access_log /usr/local/var/log/nginx/example.co.uk-access.log;
error_log /usr/local/var/log/nginx/example.co.uk-error.log error;
root /var/www/example.co.uk/public;
index index.php index.html;
sysctl -w vm.max_map_count=262144
version: "3"
services:
sonarqube:
image: sonarqube:8-community
depends_on:
- db
environment:
FROM centos:7
RUN yum -y update
RUN yum -y install httpd httpd-tools git vim
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
RUN yum --enablerepo=remi-php73 -y install php php-bcmatch php-pdo_mysql php-mbstring php-dom php-gd
sudo usb_modeswitch -KW -v 0bda -p 1a2b
git log --pretty=format: --name-only "*.php" | sort | uniq -c | sort -rg | head -10
@tiagodevweb
tiagodevweb / docker-cleanup-resources.md
Created June 30, 2018 02:39 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm