Skip to content

Instantly share code, notes, and snippets.

View sebkolind's full-sized avatar
zap!

Sebastian L. K. Sørensen sebkolind

zap!
View GitHub Profile
@ZodmanPerth
ZodmanPerth / Readme.md
Last active March 17, 2025 15:16
Godot 4 Pixel Art Settings

Settings for pixel art in Godot 4

  1. Turn on Advanced project settings
  2. Navigate to Rendering | Textures
  3. Turn on Lossless Compression | Force PNG
  4. Set Canvas Textures | Default Texture Filter to Nearest
@sebkolind
sebkolind / array-move-by-one.ts
Last active April 26, 2022 05:19
Move all items in an array in either direction by one in Typescript. Does not mutate the source array, and returns a new array.
function arrayMoveByOne(source: unknown[], reverse = false): unknown[] {
const s = [...source];
const c = [...s];
let i = 0;
while (i < s.length) {
if (reverse) {
if (s[i - 1] == null) {
c[s.length - 1] = s[0];
@judaew
judaew / keychron_k2.adoc
Last active April 22, 2025 12:50
Keychron K2 Manual

Keychron K2 Manual

Connect Bluetooth

On the side of the keyboard, switch the toggle to Bluetooth. Press fn+1 3 seconds and pair with device named Keychron K2.

  • fn+1 connect to 1st device

  • fn+2 connect to 2nd device

  • fn+3 connect to 3rd device

@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active April 14, 2025 11:50
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active April 23, 2025 08:47
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active April 23, 2025 17:13
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@mgreensmith
mgreensmith / Slack_solarized_themes
Last active March 17, 2025 14:33
Solarized themes for Slack
Solarized
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F
Solarized Dark
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F
@hovsater
hovsater / gist:5068370
Last active October 21, 2021 08:58
Removing non-empty local directories with netrw

A few months ago I read Drew Neil's article about split windows and the project drawer. It's a great article and I strongly recommend you to go ahead and read it.

The article got me spending some time with netrw and sure enough, it replaced NERDTree. One thing that annoyed me though, was its default for deleting directories. Quoting from :help netrw-delete.

Deleting/removing files and directories involves moving the cursor to the file/directory to be deleted and pressing "D". Directories must be empty first before they can be successfully removed.

This is not a default I'm happy with, but as with everything else in Vim, netrw is customisable. The default command for deleting local directories is rmdir which requires the directory to be empty. By setting `g:netrw_localrmdir