Prereqisites
 
 
 Link to heading 
 
 
 sudo pacman -S qrencode
 Also make sure you have a proper UTF8 font installed! 
 
 Usage
 
 
 Link to heading 
 
 
 From STDIN : 
 qrencode -t ansiutf8 <<< 'your_string_here' 
 From file: 
 qrencode -t ansiutf8 < ~/.ssh/id_ed25519.pub


 Prerequisites
 
 
 Link to heading 
 
 
 Install Docker Here . 
 
 Shell
 
 
 Link to heading 
 
 
 You need the bigger Debian based docker image for installing Rails as it needs
to have gcc and make for building naitve extensions. 
 docker-here ruby:3.3.0 bash
 
 Rails
 
 
 Link to heading 
 
 
…
Here is how you can make an assertion on a nested call to another class: 
 let( :double ) { instance_double( 'something' ) }
 
 before do 
 allow( SomeClass ) . to receive( :some_method ) . and_return(double)
 allow(double) . to receive( :another ) . and_return( true )
 end 
 
 it 'does something useful' do 
 subject . call
 
 expect( SomeClass ) . to…

 Open your pacman.cfg file: 
 
 sudo vim /etc/pacman.conf
 
 Uncomment or add these instructions: 
 
 Color
ILoveCandy
 
 Update your system with sudo pacman -Syyu . 


 Prerequisites
 
 
 Link to heading 
 
 
 Create a basic file: 
 echo 'abc123' > test123.txt
 
 Digest
 
 
 Link to heading 
 
 
 Find the sha256sum of a file with: 
 sha256sum test123.txt
 You will get the following result: 
 5ecf8d2cc410094e8b82dd0bc178a57f3aa1e80916689beb00fe56148b1b1256 test123.txt
 
 NOTE:…
Put one noop task at the beginning and end of your role: 
 ---
 
 - name : ToolInstall 
 ansible.builtin.meta : noop 
 
 # ... 
 
 - name : ToolInstallEnd 
 ansible.builtin.meta : noop 
 Now you can resume from where you left off with: 
 ansible-playbook playbooks/tool/install.yml --start-at-task = ToolInstall
 And you can skip over that role and…
If you’re tired of seeing these: 
 evil-line-move: Beginning of buffer [81 times]
evil-line-move: End of buffer [32 times]
evil-forward-char: End of line [66 times]
evil-backward-char: Beginning of line [66 times]
 Add these lines to your dotspacemacs/user-config : 
 (with-eval-after-load 'evil 
 (advice-add 'evil-line-move 
 :filter-args
 (lambda (args) (…
Let’s say you have a piece of code: 
 class SomeThing 
 def initialize (thing)
 @thing = thing
 end 
 
 def call 
 puts @thing . inspect
 end 
 end 
 You want to execute this in parallel in a ractor: 
 Ractor . new { SomeThing . new( 1 ) . call }
 This works if you have the block written within the Ractor. But it will fail
if the block is…
If you run git init you will get this yellow hint: 
 hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly…
The best way to structure yout repository is to have an empty root commit and to
squash all the other commits periodically onto the second. This reduces the
repository size making it easier to clone in CI and for your end users. 
 
 Empty root commit
 
 
 Link to heading 
 
 
 Create an empty commit: 
 git commit -m 'Initial commit' --allow-empty
…

 Steps
 
 
 Link to heading 
 
 
 Fetch a command with either: 
 
 C-e C-u : go to end of line, cut until beginning of line. 
 C-a C-k : go to start of line, cut until end of line. 
 
 Navigate to older command with: 
 
 C-p : previous command. 
 C-r : search command (use fzf for better
results). 
 
 Navigate to the end with…
You should always check if the value is present in a list before adding it in. 
 function prepend_path () { 
 case ': ${ PATH } :' in
 *: ' $1 ' :* ) 
 ;;
 * ) 
 PATH = ' $1 : ${ PATH } ' 
 esac 
 } 
 
 Usage
 
 
 Link to heading 
 
 
 prepend_path ~/.local/bin
 
 Cleanup
 
 
 Link to heading 
 
 
…

 Docker
 
 
 Link to heading 
 
 
 The best way to manage ruby for your project is by using Docker: 
 
 Docker Images: basic Ruby setup 
 Docker Projects 
 
 If you don’t have a Docker setup yet, you have to suffer, temporarily, by using
 rbenv . There used to be another tool called rvm for this sort of thing but
it’s been…
The instructions at https://brew.sh/ are extremely dangerous! Here is how to
install homebrew properly. 
 
 NOTE: we assume your homebrew path is: ~/Workspace/Hub/brew 
 
 Code
 
 
 Link to heading 
 
 
 
 
 Clone the repository: 
 git clone https://github.com/Homebrew/brew.git ~/Workspace/Hub/brew
 
 cd ~/Workspace/Hub/brew
…

 Setup
 
 
 Link to heading 
 
 
 Your .gitignore : 
 *.elc
 A Makefile containing: 
 .PHONY : compile
 compile : 
 	@emacs -q -batch \
 	 --eval '(setq byte-compile-error-on-warn t)' \
 	 -f batch-byte-compile \
 	 *.el
 
 The first indentation is a tab, the following two are spaces. Makefiles just
work this…

 Basic
 
 
 Link to heading 
 
 
 sudo echo 'blacklist pcspkr' > /etc/modprobe.d/nobeep.conf
 And restart your machine! 
 
 Automated
 
 
 Link to heading 
 
 
 Add this to an ansible role roles/os/configure/nobeep.yml : 
 # ------------------------------------------------------------------------------- 
 # Bell Sound 
 #…
The command is: 
 git diff --exit-code
 Prints the diff and exits with status code 1 . 
 
 CI
 
 
 Link to heading 
 
 
 generate :
 image : ruby:3.1.2-alpine 
 script :
 - apk add --update git make 
 - make generate 
 - git diff --exit-code 

Are you a hardcore elisp programmer? Add this to your ~/.spacemacs : 
 dotspacemacs-additional-packages ' (
 (treemacs :location
 (recipe :fetcher file
 :path '~/path/to/treemacs/src/elisp' )
 :update nil ))
 Now you can hack on any emacs package in your live editor! 
 
 Notes
 
 
 Link to heading 
 
 
 
 You will need to manually delete…
Locations: 
 # System 
 /usr/share/applications/
 /usr/local/share/applications/
 
 # Flatpak 
 /var/lib/flatpak/exports/share/applications/
 
 # Snap 
 /var/lib/snapd/desktop/applications/
 
 # Local 
 ~/.local/share/applications/
 Search for your application in those directories and edit the files, using
 root privileges where necessary.…
You have the following: 
 callable = proc { puts 'Hello' }
 Pass it to a function like this: 
 def pass_me_something 
 yield if block_given?
 end 
 
 pass_me_something( & callable)
 Or be explicit: 
 def pass_me_something ( & block)
 block . call if block_given?
 end 
 
 pass_me_something( & callable)
 You can also be weird: 
 def…

 Rules
 
 
 Link to heading 
 
 
 Here are my rules for git branch names: 
 
 Don’t start with the letter m , that’s reserved for master or main . 
 No prefixes! 
 No ids inside branch names. 
 Use english words, more than one… 
 Pick either - or _ for separator, but be consistent, never mix. 
 Use common sense! 
…
JavaScript developers have no dignity! Here is how you can restore it: 
 npm config set fund false
 
 Docker
 
 
 Link to heading 
 
 
 Add this to your Dockerfile : 
 # ------------------------------------------------------------------------------ 
 # NPM 
 
 RUN set -ex && \
 \
 echo 'Restore dignity to the jacascript community' &&…
Every image or document you create has built in spyware, remove it like this: 
 
 Install
 
 
 Link to heading 
 
 
 sudo pacman -S perl-image-exiftool
 
 Usage
 
 
 Link to heading 
 
 
 exiftool -overwrite_original_in_place -all = path-to-file


 Prerequisites
 
 
 Link to heading 
 
 
 sudo pacman -S gimp imagemagick poppler
 
 PDF to PNG
 
 
 Link to heading 
 
 
 Create a directory with your INITAIL.pdf then execute this inside of it: 
 pdftoppm INITIAL.pdf prefix-for-images -png
 
 Do whatever
 
 
 Link to heading 
 
 
 Edit your images in…

 Prerequisites
 
 
 Link to heading 
 
 
 Make sure you have systemd installed with at least version 248 : 
 pacman -Ss systemd | grep 'core/systemd ' 
 
 # core/systemd 248.2-1.1 [installed] 
 
 Setup
 
 
 Link to heading 
 
 
 Check if the service is active: 
 systemctl status systemd-oomd.service
 Enable and start…

 
 Navigate to your function. 
 
 
 Instrument it with C-u M-x eval-defun , or C-u , e f in Spacemacs. 
 
 
 Execute that function. 
 
 
 Debug with these shortcuts: 
 
 
 
 Key 
 Action 
 
 
 
 
 s 
 Next sexp. 
 
 
 i 
 Step in. 
 
 
 o 
 Step out. 
 
 
 d 
…