Skip to content

Instantly share code, notes, and snippets.

@dreikanter
dreikanter / nuphy-air75-v2.md
Last active March 15, 2026 20:15
NuPhy Air75 V2 Hotkeys

NuPhy Air75 V2 Hotkeys

System

Combo Action
Toggle on back Win / Mac mode switch

Connection

@dreikanter
dreikanter / 20260314_9246_dotfiles-research.md
Last active March 14, 2026 11:41
Dotfiles Management Research

Dotfiles Management Research

Tools Landscape

Tool Stars Symlinks Copies Templates Multi-machine Dependencies Complexity
chezmoi 18.5k No Yes Yes (Go) Yes Go binary Medium
dotbot 7.8k Yes No No Via profiles Python Low
yadm 6.2k No In-place Yes Yes (alts) Git + Bash Low
rcm 3.2k Yes No No Yes (tags) Shell Low
@dreikanter
dreikanter / encrypt_openssl.md
Last active January 20, 2026 07:55 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@dreikanter
dreikanter / input-source-switching.json
Created August 27, 2025 18:03
Karabinier-Elements idempotent hotkeys configuration for switching between two keyboard layouts
{
"description": "Use idempotent hotkeys to switch between two keyboard layouts",
"manipulators": [
{
"from": {
"key_code": "1",
"modifiers": {
"mandatory": ["left_command", "left_option"],
"optional": ["any"]
}
@dreikanter
dreikanter / Interpolator.cs
Last active August 13, 2025 14:52
Spline interpolation in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace Interpolation
{
/// <summary>
/// Spline interpolation class.
@dreikanter
dreikanter / github_backup.md
Last active June 5, 2024 00:00
Keep your 🧳 together

Create Github access token: https://github.com/settings/tokens

Setup backup tool:

pip3 install github-backup

export GITHUB_BACKUP_TOKEN=ghp_bananabananabananabananabananabanana
export GITHUB_BACKUP_USER=dreikanter
export GITHUB_BACKUP_PATH=~/github-backup/$GITHUB_BACKUP_USER
@dreikanter
dreikanter / emberjs-cheat-sheet.md
Last active December 11, 2023 05:01
Ember.js Cheat Sheet

Core concepts

Model

  • An object that stores data (data persistance layer abstraction).
  • Templates transforms models into HTML.
  • Same thing as Rails model.

Template

@dreikanter
dreikanter / README.md
Created June 15, 2022 14:04
A script to extract hashtags from stdin

Usage example:

echo "#banana #banana #ololo #un_der-sco_re #по-русски #123" | ./extract_hashtags
#123
#banana
#ololo
#un_der-sco_re
#по-русски
@dreikanter
dreikanter / init.lua
Last active December 11, 2021 20:41
~/.hammerspoon/init.lua
-- hs.hotkey.bind({"cmd", "shift"}, "1", function()
-- hs.keycodes.setLayout("English - Ilya Birman Typography")
-- end)
-- hs.hotkey.bind({"cmd", "shift"}, "2", function()
-- hs.keycodes.setLayout("Russian - Ilya Birman Typography")
-- end)
hs.hotkey.bind({"cmd", "alt"}, "1", function()
hs.keycodes.setLayout("English - Ilya Birman Typography")
@dreikanter
dreikanter / gzip-demo.py
Created May 30, 2012 10:01
Create tar.gz archive with Python, unpack files back and check the result
# Python gzip demo: create and unpack archive
import os
import random
import string
import glob
import tarfile
import shutil
import filecmp