Skip to content

Instantly share code, notes, and snippets.

View szukalski's full-sized avatar

David James szukalski

  • Germany
View GitHub Profile
@szukalski
szukalski / fail2ban-ufw-logwatch.sh
Last active November 2, 2024 18:31
fail2ban ufw logwatch
#!/bin/bash
# Run as root
if [ "$#" -ne 1 ];
then
echo "Usage: <script> <username>"
exit 1
fi
USER=$1
[email protected]
@szukalski
szukalski / tmux_cheat.txt
Created February 2, 2017 09:36
tmux cheatsheet
Session:
C-b d Detach session
tmux ls List sessions
tmux new -s <session> New session
tmux attach -t <session> Attach session
Panes:
C-b % Split pane horizontally
C-b " Split pane vertically
C-b <arrow key> Navigate panes
docker build -t image_name .
docker tag image_id szukalski/image_name:latest
docker login
docker push szukalski/image_name
@szukalski
szukalski / docker_commands.txt
Last active March 6, 2017 08:18
useful docker commands
docker run -d -v <local_vol>:<container_vol> -p <local_port>:<container_port> --restart always IMAGE
docker exec -it RUNNING_IMAGE COMMAND
@szukalski
szukalski / boxstarter.ps1
Last active October 25, 2017 07:11 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: szukalski
# Last Updated: 2017-10-16
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# Description: Boxstarter Script
# Author: szukalski
# Last Updated: 2018-09-18
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt: