Skip to content

Instantly share code, notes, and snippets.

View alphashuro's full-sized avatar
🔬

Alpha Shuro alphashuro

🔬
  • Pleo
View GitHub Profile
@alphashuro
alphashuro / [roc].nvim.lua
Last active May 22, 2024 10:25
neovim lua autocmd for roc lsp
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = { "*.roc" },
callback = function(ev)
vim.lsp.start({
name = "roc-ls",
cmd = { "roc_language_server" },
root_dir = vim.fn.getcwd(),
})
end,
})
@alphashuro
alphashuro / remarkable-2-custom-layout.adoc
Last active March 30, 2024 17:16
Using a custom keyboard layout with Remarkable 2 and type-folio

This was mostly sourced from @mkborregaard’s instructions in this conversation.

TL;DR: You need to compile a custom driver that interprets the keyboard’s keys according according to your desired layout. Once you’ve copied the driver to your remarkable via SSh and restarted it, it should just work™️.

  1. first, clone the remarkable linux kernel

    git clone https://github.com/reMarkable/linux remarkable-linux-kernel
    cd remarkable-linux-kernel
@alphashuro
alphashuro / alfred-kitty-applescript
Created April 24, 2022 11:18
AppleScript for using Alfred with kitty
on alfred_script(q)
set cmd to q
repeat while cmd starts with space
set cmd to cmd's text 2 thru -1
end repeat
tell application "kitty" to activate
do shell script "/Applications/Kitty.app/Contents/MacOS/kitty @ --to unix:/tmp/mykitty new-window --new-tab"
tell application "System Events" to keystroke cmd
tell application "System Events"
git clone git@github.com:DreymaR/BigBagKbdTrixXKB.git
cd BigBagKbdTrixXKB
chmod +x *.sh
bash install-dreymar-xmod.sh -ox
./setxkb.sh -a 5ca
# reset with `sudo apt-get install xkb-data`
#!/bin/sh
read -e -p "1password email?: " onepassemail
read -e -p "1password domain?: " onepassdomain
op account add --address $onepassdomain --email $onepassemail
eval $(op signin --account $onepassdomain)
# TODO: handle existing private key
mkdir -p $HOME/.ssh
KEY=$HOME/.ssh/id_rsa
@alphashuro
alphashuro / shell.nix
Last active May 19, 2024 08:21
a base for starting nix shell scripts
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";
pkgs = import nixpkgs { config = {}; overlays = []; };
in
pkgs.mkShellNoCC {
packages = with pkgs; [git];
}
@alphashuro
alphashuro / .vimrc
Last active March 17, 2019 13:31
My vim config
" kill vi compatibility
syntax enable
set fileformat=unix
set hidden
set number " always show line numbers
filetype plugin indent on
set tabstop=2 " 2 spaces per tab
set shiftwidth=2 " when indenting with > use 2 spaces