Skip to content

Instantly share code, notes, and snippets.

@jawee
jawee / .clangd
Created December 23, 2023 07:05
.clangd
CompileFlags: # Tweak the parse settings
Add: [-I/usr/local/include]
@jawee
jawee / adv360-dual-boot.md
Created December 23, 2023 06:09
adv360 dual boot

From https://blog.christopherhoelter.com/kinesis-advantage-360-bluetooth-dualboot

  1. Boot into windows and pair the keyboard on the target bluetooth profile.
  2. Restart and boot into linux. On the keyboard, forget the pairing of the previous target profile (mod+right win). Now, pair the keyboard on linux.
  3. Copy the paired bluetooth key from linux. This will be in a file at the path /var/lib/bluetooth/{controller-mac-address}/{keyboard-mac-address}/info. Look for a line like key={32 characters here} in the file, that's the key. It may there multiple times. Write it down or copy it somewhere accessible when you reboot into windows.
  4. Reboot into windows and ensure the keyboard doesn't try and connect. Now, you need to edit the registry file for the bluetooth keyboard and replace the key with the key grabbed from the linux partition.
  5. Download PSExec in order to open up the registry editor with the proper permissions. Once the tool is unzipped, in an admin command shell run .\PsExec64.exe -s -i regedit.exe
public readonly struct Result<TValue, TError>
{
private readonly TValue? _value;
private readonly TError? _error;
public bool IsError { get; }
public bool IsSuccess => !IsError;
private Result(TValue value)
{
@jawee
jawee / settings.json
Created March 19, 2023 09:38
Windows Terminal Settings
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
@jawee
jawee / settings.json
Last active August 18, 2022 06:52
VSCode vim settings
{
"workbench.colorTheme": "Gruvbox Dark Hard",
"vim.leader": " ",
"vim.smartRelativeLine": true,
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": ["<leader>", "v", "r", "n"],
"commands": ["editor.action.rename"]
},
{
let mapleader=" "
set relativenumber
set nohlsearch
set expandtab
set nu
set nowrap
set smartcase
set clipboard=unnamed,autoselect
set surround
set visualbell
@jawee
jawee / .vsvimrc
Last active January 14, 2023 08:19
.vsvimrc
set relativenumber
set nohlsearch
set expandtab
set nu
set nowrap
set smartcase
let mapleader = " "
set scrolloff=8
nnoremap <leader>pf :vsc Edit.GoToFile<CR>
@jawee
jawee / settings.json
Last active September 9, 2021 07:25
gruvbox dark hard windows terminal theme
{
"background": "#1d2021",
"black": "#1d2021",
"blue": "#458588",
"brightBlack": "#928374",
"brightBlue": "#83A598",
"brightCyan": "#8EC07C",
"brightGreen": "#B8BB26",
"brightPurple": "#D3869B",
"brightRed": "#FB4934",
@jawee
jawee / .vimrc
Created September 25, 2020 05:09
.vimrc simplified
syntax on
set guicursor=
set noshowmatch
set relativenumber
set nohlsearch
set hidden
set noerrorbells
set expandtab
set shiftwidth=2
@jawee
jawee / .vimrc
Last active June 25, 2021 11:07
vimrc 2020
syntax on
set guicursor=
set noshowmatch
set relativenumber
set nohlsearch
set hidden
set noerrorbells
set expandtab
set shiftwidth=2