Skip to content

Instantly share code, notes, and snippets.

@maciakl
maciakl / Readme.md
Last active October 1, 2024 05:53
My CLi bookmarking function for PowerShell. It allows you to store a current path as a bookmark and then quickly go back to it later.

Bookmarks for the CLI

This powershell function allows you to bookmark a path and then effortlessly return to it at a later time.

Philosophy

Imagine having a short list of bookmarks available in your CLI. You have one for your current project, one for your other current project, one for your Neovim setup, one for this thing you jave to do this week and never have to touch again, and etc. Imagine being able to jump between them with one simple command.

Now imagine you only have 10 bookmark slots, so you have to be judicious as to what you bookmark, and how you maintain the list, so that it continues being useful.

@maciakl
maciakl / hello.go
Last active October 1, 2024 01:41
Hello World in Go
package main
import (
"os"
"fmt"
"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