Skip to content

Instantly share code, notes, and snippets.

@maciakl
maciakl / hello.go
Created May 31, 2024 04:07
Hello World in Go
package main
import (
"os"
"fmt"
"flag"
"path/filepath"
)
const version = "0.1.0"
@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