Skip to content

Instantly share code, notes, and snippets.

View ivankovnatsky's full-sized avatar

Ivan Kovnatsky ivankovnatsky

View GitHub Profile
# Use environment variables to get the current user's AppData folder
$StartupFolder = [Environment]::GetFolderPath('Startup')
$FilePath = Join-Path -Path $StartupFolder -ChildPath "kinput.ahk"
# Create the AutoHotkey v2 script content
$ScriptContent = 'CapsLock::Send("{Alt Down}{Shift Down}{Shift Up}{Alt Up}")'
# Write the content to the file
Set-Content -Path $FilePath -Value $ScriptContent -Force
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
mkpart primary 2048s 100%
cryptsetup luksFormat /dev/nvme1n1p1
cryptsetup luksOpen /dev/nvme1n1p1 crypted
mkfs.fat -F 32 -n boot /dev/nvme0n1p2
mount /dev/disk/by-label/root /mnt
mkdir -p /mnt/boot
mount /dev/nvme0n1p2 /mnt/boot
# Specify the preferences directory
defaults write com.googlecode.iterm2 PrefsCustomFolder -string "~/.iterm2"
# Tell iTerm2 to use the custom preferences in the directory
defaults write com.googlecode.iterm2 LoadPrefsFromCustomFolder -bool true
@ivankovnatsky
ivankovnatsky / split_keyboards.md
Created July 11, 2022 05:51 — forked from itod/split_keyboards.md
Every "split" mechanical keyboard currently being sold that I know of
{
"colors": {
"primary": {
"background": "#000000"
}
},
"font": {
"bold": {
"family": "Hack Nerd Font Mono"
},
# Ubuntu 20.10 and newer
sudo apt-get -y update
sudo apt-get -y install podman neovim sysstat
# Ubuntu 22.04
cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF
".config/tmuxinator/default.yml" = {
text = ''
name: default
startup_window: 1
root: ~/Sources/github.com/elastio
windows:
- work-editor:
panes:
- nvim
export http_proxy
export https_proxy
export ftp_prox
export no_proxy
export HTTPS_PROXY
export HTTPS_PROXY
export FTP_PROX
export NO_PROXY
apt update
apt install htop -y
apt install dnsutils -y
apt install docker -y
apt install jq -y
apt install kubetail -y
apt install neovim -y
apt install tmux -y
curl -sfL https://get.k3s.io | sh -
curl -sS https://webinstall.dev/k9s | bash