Skip to content

Instantly share code, notes, and snippets.

@rjl6789
rjl6789 / cp_keys
Last active October 24, 2024 10:35
encrypted swap and boot with hibernation - Debian
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
@rjl6789
rjl6789 / bash-completion-slowness-on-msys2.md
Created January 3, 2020 08:35 — forked from k-takata/bash-completion-slowness-on-msys2.md
Bash-completion is very slow on MSYS2

Bash-completion is very slow on MSYS2

Bash-completion is very slow on MSYS2 when the current user is a domain user. This describes the cause and the solutions.

Cause

Expansion of ~* is very slow when you use a domain user. For example:

@rjl6789
rjl6789 / doom.txt
Created February 10, 2020 12:58 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@rjl6789
rjl6789 / README.md
Last active June 8, 2020 17:25 — forked from robertpainsi/README.md
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
@rjl6789
rjl6789 / free.c
Created August 20, 2020 11:53 — forked from ztmr/free.c
OpenBSD equivalent of `free' Linux command. Shows memory usage.
/*
* $Id: $
*
* Module: free -- description
* Created: 15-SEP-2008 17:56
* Author: tmr
*/
#include <stdio.h>
#include <unistd.h>
@rjl6789
rjl6789 / hippie.el
Created March 22, 2022 09:30 — forked from JohnLunzer/hippie.el
Hippie expansion menu using ivy (fallback to ido)
;; * IDO/IVY completion menu
;; This is originally from https://www.emacswiki.org/emacs/HippieExpand#toc10
;;
;; There are a few improvements:
;; - It is undo friendly with the addition of save-excursion
;; - It will use ivy for the expansion menu if ivy is available, falls back to ido
;; - Automatically expands if there is only one possible expansion
(defun my-hippie-expand-completions (&optional hippie-expand-function)
"Return list of completions generated by `hippie-expand'."
@rjl6789
rjl6789 / rhel_install_git_cmake.md
Created January 30, 2024 14:55 — forked from zrsmithson/rhel_install_git_cmake.md
Installing latest cmake and git versions on Rhel/Centos, and setting it as the default commands

Installing the latest git/cmake versions on RHEL/Centos

This should work on other Fedora-based distributions and for other packages, but I have not done extensive testing

Introduction

Using up-to-date versions of software on RHEL is a pain. I understand the eneterprise benefits, but configuring a development environment can be confusing, with most people using a combination of symlinks, adding folders to PATH, and enabling an scl_source

While this is still generally acceptable, there exists an alternative method (sorry).

The alternatives essentially creates a symlink, but it actually is a symbolic link to the alternatives directory, which in turn is a symbolic link to the actual program.

This allows for better package management and confines all sysadmin changes to the /etc directory, all while making switching back easier. It feels to me a lot like virtualenv in python