Skip to content

Instantly share code, notes, and snippets.

View rjl6789's full-sized avatar

Rob rjl6789

  • England
View GitHub Profile
@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

@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 / 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 / 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 / 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 / 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 / cp_keys
Last active November 8, 2019 10:44
encrypted swap and boot with hibernation - Debian
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
@rjl6789
rjl6789 / git-clearHistory
Created September 13, 2019 10:20 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@rjl6789
rjl6789 / boost-windows.md
Created September 6, 2019 13:50 — forked from sim642/boost-windows.md
Installing boost libraries for GCC (MinGW) on Windows

Installing boost libraries for GCC (MinGW) on Windows

Folder setup

  1. Extract downloaded boost source, e.g. C:\Program Files\boost_1_59_0.
  2. Create a folder for Boost.Build installation, e.g. C:\Program Files\boost-build.
  3. Create a folder within for building, i.e. C:\Program Files\boost_1_59_0\build.
  4. Create a folder for installation, e.g. C:\Program Files\boost.

GCC setup

  1. Open Command Prompt.
@rjl6789
rjl6789 / mngw-w64_boost.MD
Created September 6, 2019 10:34 — forked from zrsmithson/mngw-w64_boost.MD
Installing boost on Windows using MinGW-w64 (gcc 64-bit)

Installing boost on Windows using MinGW-w64 (gcc 64-bit)

Introduction

Boost is easy when you are using headers or pre-compiled binaries for visual studio, but it can be a pain to compile from source on windows, especially when you want the 64-bit version of MinGW to use gcc/g++. This installation process should be thorough enough to simply copy and paste commands, but robust enough to install everything you need.

Note: if you need to install any of the libraries that need dependencies, see this great answer from stack overflow

Get files needed for install

Get the MinGW installer mingw-w64-install.exe from Sourceforge
Get the boost_1_68_0.zip source from Sourceforge
__Note: This should work perfectly w