Skip to content

Instantly share code, notes, and snippets.

View SystemZ's full-sized avatar

Michał Frąckiewicz SystemZ

View GitHub Profile
@SystemZ
SystemZ / git-help.md
Created March 26, 2018 12:49
Git fast manual

Keybase proof

I hereby claim:

  • I am systemz on github.
  • I am systemz (https://keybase.io/systemz) on keybase.
  • I have a public key ASBX478NMvzJEQ6Oy0xNslYbWp3c7CsnSJcQeTvmTdvCeAo

To claim this, I am signing this object:

@SystemZ
SystemZ / docker_clear.sh
Created June 19, 2016 21:59
Clear all docker images and containers
#!/bin/bash
#https://techoverflow.net/blog/2013/10/22/docker-remove-all-images-and-containers/
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
@SystemZ
SystemZ / docker_proc.sh
Created June 18, 2016 19:26
List docker container processes
#!/bin/bash
#https://groups.google.com/forum/#!topic/docker-user/g9yDdQsoDFE
htop -p $(sudo docker ps -q | xargs sudo docker inspect --format {{.State.Pid}} | awk -vORS=, '{ print $1 }' | sed 's/,$/\n/')
@SystemZ
SystemZ / config_changes.sh
Created April 6, 2016 11:37
Changed config files in /etc/ in last 2h
#!/bin/bash
find /etc/ -mmin -120 -ls
@SystemZ
SystemZ / banhammer_china.sh
Last active February 5, 2021 22:57
Geoblock IPs from China
#!/bin/bash
#install this first
#apt-get install ipset
#add kernel module
modprobe -v ip_set
modprobe -v ip_set_hash_netport
#create list for IPs
ipset create geoblock hash:net
@SystemZ
SystemZ / mtr.sh
Created February 2, 2016 16:54
MTR raport
#http://www.commandlinefu.com/commands/view/1878/use-mtr-to-create-a-text-file-report
mtr --report --report-cycles 100 www.google.com > google_net_report.txt
@SystemZ
SystemZ / git_medkit.txt
Last active February 1, 2016 22:40
Git first aid kit
#http://rogerdudler.github.io/git-guide/files/git_cheat_sheet.pdf
##ignore chmod - http://stackoverflow.com/a/1580644/1351857
#git config core.fileMode false
##remove vendor or node_modules -
##http://stackoverflow.com/a/17824718/1351857
##http://stackoverflow.com/a/32886427/1351857
#git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD
#echo node_modules/ >> .gitignore
@SystemZ
SystemZ / bootstrap_prefix
Created January 21, 2016 11:45
Prefix bootstrap to prevent conflicts in wordpress plugin
https://formden.com/blog/isolate-bootstrap
sudo npm install less -g
prefix.less
.superbootstart {
@import (less) 'bootstrap.css';
@import (less) 'bootstrap-theme.css'; /* optional */
}
@SystemZ
SystemZ / ts_srv.sh
Last active January 12, 2016 05:56
dig -t SRV _ts3._udp.domain.com