Skip to content

Instantly share code, notes, and snippets.

@Henje
Henje / papers_please_fix.cpp
Last active February 28, 2023 23:10
Simple hack to disable joystick scanning and remove stutters from Papers Please.
#include <string>
#include <dlfcn.h>
#include <stdio.h>
#include <sys/mman.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
using namespace std::literals;
@romainl
romainl / Don't use Vim.md
Last active May 14, 2024 14:09
Don't use Vim for the wrong reasons

Don't use Vim

Don't do the crime, if you can't do the time.

-- Anthony Vincenzo "Tony" Baretta

Vim is an amazing text editor. I love it. Really, I wouldn't [organize][organize] a Vim advent calendar if I didn't. But, as amazing as it is, Vim is not for everyone. It can't solve all your problems, or be a TUI version of your favorite IDE, or make you a better programmer, or land you that dream job in the Bay Area. But Vim can help you be more mindful, focused, and efficient, as long as you approach it with the right mindset.

Don't get me wrong, I certainly welcome you to try Vim, but I'm not a proselyte. I don't thrive on newbies. I just want you to use the right tool for the job and not waste your—and anyone's—time on a fruitless quest.

@NadOby
NadOby / svelte_vim.md
Last active March 12, 2023 18:37
Howto configure Svelte 3 Editing under NeoVim

SvelteJS from absolute zero to editing it in (Neo)Vim

Assuming that we don't have nothing related to JavaScript installed or configured.

Based on https://www.rockyourcode.com/vim-and-svelte-js

Installation of Node.js using NVM

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
nvm install node
@SuperSpyTX
SuperSpyTX / README.md
Last active February 20, 2022 12:10
42 Norminette linter for ALE.

Norminette Linter for ALE (Asynchronous Linting Engine)

https://github.com/w0rp/ale

Installation

Install this in your ale plugin directory (For Vundle + NeoVim that may be ~/.config/nvim/bundle/ale/ale_linters/c/norminette.vim)

You will of course, need the norminette ruby gem in your PATH. gem install --user --pre norminette

@LogIN-
LogIN- / add_trackers.sh
Created August 10, 2017 22:04
Transmission CLI add trackers in BULK
#!/bin/bash
# I was looking for a way to add/modify all trackers in all torrents in my remote transmission instance.
# So I had bunch of old torrents like 500 of them with mostly broken outdated trackers.
# This is a small helper script that will loop over all your torrents and add trackers that finds on torrentz domain.
# I came out on this: https://github.com/Entware-ng/Entware-ng/wiki/Using-Transmission#adding-more-trackers little script and modify it a bit.
# Please modify this script that it suits your environment.
base_url='https://torrentz2.is'
pattern='announcelist_[0-9]+'
@romainl
romainl / colorscheme-override.md
Last active July 14, 2024 01:08
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.
/** Emulate `cmd1 | cmd2 | more` pipeline using recursion.
http://stackoverflow.com/questions/20434124/recursive-piping-in-unix-environment
*/
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>