Skip to content

Instantly share code, notes, and snippets.

@maciakl
maciakl / .tmux.conf
Created August 22, 2023 04:47
Minmal tmux config file for servers
# remap prefix to C-a
set -g prefix C-a
unbind-key C-b
bind-key C-a send prefix
# set 256 bit color mode
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
@maciakl
maciakl / branding.cmd
Created July 1, 2022 05:06
Interactive helper script to change Registered Owner and Registered Organization registry values.
@echo off
if "%1" == "elevated" goto start
powershell -command "Start-Process %~nx0 elevated -Verb runas"
goto :eof
:start
@echo off
cls
echo.
@maciakl
maciakl / uxp.cmd
Last active September 1, 2022 01:24
Helper script to improve Windows 10 user experience.
@echo off
if "%1" == "elevated" goto start
powershell -command "Start-Process %~nx0 elevated -Verb runas"
goto :eof
:start
@echo off
cls
@echo off
if "%1" == "elevated" goto start
powershell -command "Start-Process %~nx0 elevated -Verb runas"
goto :eof
:start
@echo off
cls
@maciakl
maciakl / bde.cmd
Created July 1, 2022 04:41
Interactive helper script that will initiate decryption of a bitlocer drive then monitor the progress.
@echo off
if "%1" == "elevated" goto start
powershell -command "Start-Process %~nx0 elevated -Verb runas"
goto :eof
:start
@echo off
cls
CALL :HEAD
@maciakl
maciakl / shadowcopy.cmd
Created July 1, 2022 04:34
Interactive helper script to create a shadowcopy job that will create a snapshot of your c: drive every day at 1pm.
@echo off
if "%1" == "elevated" goto start
powershell -command "Start-Process %~nx0 elevated -Verb runas"
goto :eof
:start
@echo off
cls
@maciakl
maciakl / admin.cmd
Created July 1, 2022 04:28
Interactive helper script to activate Admin account and change it's password
@echo off
if "%1" == "elevated" goto start
powershell -command "Start-Process %~nx0 elevated -Verb runas"
goto :eof
:start
@echo off
cls
@echo off
if "%1" == "elevated" goto start
powershell -command "Start-Process %~nx0 elevated -Verb runas"
goto :eof
:start
@echo off
cls
@maciakl
maciakl / .vimrc_minimal
Created June 27, 2022 05:45
Minimal .vimrc for servers
source /etc/vim/vimrc
" use jj to quickly escape to normal mode while typing
inoremap jj <ESC>
" press ; to issue commands in normal mode (no more shift holding)
nnoremap ; :
" move by screen lines, not by real lines - great for creative writing
nnoremap j gj
@maciakl
maciakl / debian_logo_motd.sh
Created June 26, 2022 17:34
A nice script generating a red Debian Spiral logo. Perfect for your MOTD.
#!/bin/bash
echo -e "\e[1;31m"
echo -e " _,edm\$\$\$\$\$on."
echo -e " ,d\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$P."
echo -e " ,g\$\$P\"\" \"\"\"Y\$\$.\"."
echo -e " ,\$\$P' \`\$\$\$."
echo -e " ',\$\$P ,ggs. \`\$\$b:"
echo -e " \`d\$\$' ,\$P\"' . \$\$\$"
echo -e " \$\$P d\$' , \$\$P"
echo -e " \$\$: \$\$. - ,d\$\$'"