Skip to content

Instantly share code, notes, and snippets.

View lindhe's full-sized avatar
🦥

Andreas Lindhé lindhe

🦥
View GitHub Profile
@lindhe
lindhe / example-crd.yaml
Created March 5, 2024 08:20
Example CRD
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: foos.example.lindhe.io
spec:
group: example.lindhe.io
versions:
- name: v1
served: true
storage: true
@lindhe
lindhe / settings.json
Last active November 25, 2023 12:19
Windows Terminal configuration file
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "resizePane",
"direction": "left"
@lindhe
lindhe / repo_split.md
Created October 23, 2023 13:00
Splitting a repo

Splitting a repo

Here is a recepie for how to split a repo.

If you have a repo that you want to split in twine, life can be simple! At least if you have been a good boy and kept the different parts in different subdirectories to begin with…

This is all you have to do:

@lindhe
lindhe / wsl.conf
Last active October 5, 2023 18:50
[boot]
command = "mount --make-rshared /"
command = "ntpdate ntp.ubuntu.com"
[network]
hostname = wsl
generateResolvConf = false
@lindhe
lindhe / lsp.log
Created August 11, 2023 09:07
rust_analyzer lspconfig neovim ascii color codes issue
[START][2023-08-11 11:04:33] LSP logging initiated
[INFO][2023-08-11 11:04:33] .../vim/lsp/rpc.lua:634 "Starting RPC client" { args = {}, cmd = "/home/andreas/.local/share/nvim/mason/bin/rust-analyzer", extra = { cwd = "/home/andreas/tmp/foo" }}
[DEBUG][2023-08-11 11:04:33] .../vim/lsp/rpc.lua:261 "rpc.send" { id = 1, jsonrpc = "2.0", method = "initialize", params = { capabilities = { experimental = { serverStatusNotification = true }, general = { positionEncodings = { "utf-16" } }, textDocument = { callHierarchy = { dynamicRegistration = false }, codeAction = { codeActionLiteralSupport = { codeActionKind = { valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" } } }, dataSupport = true, dynamicRegistration = true, isPreferredSupport = true, resolveSupport = {
@lindhe
lindhe / subscribe.sh
Created December 17, 2017 12:42
Bash script to subscribe people to a mailman mailing list (at least on chs.chalmers.se)
#!/bin/bash
domain='example.com'
list='list-name'
password=''
file='./members.txt'
echo "Logging in..."
curl -v -L -X POST -j -b non-existing -c './'$list'.cookie' --data 'adminpw='$password'&admlogin=Let me in...' 'http://lists.'$domain'/mailman/admin/'$list
echo "Logged in!"
@lindhe
lindhe / gestures.ahk
Last active July 14, 2022 15:58
AutoHotKey (AHK)
; Place me in %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Map touchpad gestures to custom keybindings (Ctrl+F1, ...)
^F1:: Run wt
^F2:: Run Code
@lindhe
lindhe / Vimium configuration
Last active January 16, 2022 11:39
This are my current Vimium maps
unmapAll
map ? showHelp
# Scrolling:
map j scrollDown
map k scrollUp
map gg scrollToTop
map G scrollToBottom
map gl scrollToLeft
@lindhe
lindhe / patch.md
Last active September 13, 2021 08:03
Guide to git patches

Guide to sending Git repos and patches

$ git bundle create /tmp/foo-all --all (http://stackoverflow.com/a/2545784/893211)

Andreas Lindhé, [03.03.17 20:08]

  1. Ladda ned repo.git filen.
  2. git clone repo.git git_is_cool
  3. Redan detta är coolt. Jag skickade just en komprimerad variant av ett git-repo, och du klonade från det repot.
  4. Ladda ned patch.diff filen.
@lindhe
lindhe / kubeapps_icon_error.log
Created April 17, 2020 14:09
Log of curl to problematic icon in Kubeapps
$ curl -vvv https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/microsoft/209/negative-squared-latin-capital-letter-b_1f171.png --output - > /dev/null
* Expire in 0 ms for 6 (transfer 0x55a5970caf50)
* Expire in 1 ms for 1 (transfer 0x55a5970caf50)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Expire in 0 ms for 1 (transfer 0x55a5970caf50)
* Expire in 1 ms for 1 (transfer 0x55a5970caf50)
* Expire in 0 ms for 1 (transfer 0x55a5970caf50)
* Expire in 0 ms for 1 (transfer 0x55a5970caf50)
* Expire in 1 ms for 1 (transfer 0x55a5970caf50)