Skip to content

Instantly share code, notes, and snippets.

View Raymo111's full-sized avatar

Raymond Li Raymo111

View GitHub Profile
@Raymo111
Raymo111 / csamarkup2tikz.py
Created December 2, 2021 22:56
Python script to convert CSAcademy Graph Editor Markup to TikZ
import json
before = """\\begin{center}
\\begin{tikzpicture}[every node/.style={draw,circle,minimum size=25pt}]
\\begin{scope}[yscale=-1]
\\draw[thick]"""
after = """;
\\end{scope}
\\end{tikzpicture}
\\end{center}"""
@Raymo111
Raymo111 / MSI Bravo A4DDR Arch Install.md
Last active January 5, 2022 04:09
How to install Arch Linux on an MSI Bravo A4DDR

How to Install Arch Linux on an MSI Bravo A4DDR

By Raymo111

Last updated 29 July 2021

Disclaimer: I have personally tested every step of this. However, I'm not responsible for anything you do.

There's a Reddit thread for this laptop.

Pre-install

  1. Setup Windows.
@Raymo111
Raymo111 / Dark Reader pdf light mode.js
Created January 17, 2022 03:55
PDFium light mode for Dark Reader
let eee = "#eeeeee"
let sr = document.querySelector("#viewer").shadowRoot.querySelector("#toolbar").shadowRoot
sr.querySelector("#toolbar").style.backgroundColor = "lightgray"
sr.querySelector("#toolbar").style.color = "black"
let ce = sr.querySelector("#center").firstElementChild.shadowRoot
ce.querySelector("#pageselector").style.backgroundColor = eee
ce.querySelector("#pageselector").style.color = "black"
ce.querySelector("#divider").style.color = "black"
ce.querySelector("#pagelength").style.color = "black"
sr.querySelector("[aria-label='Zoom level']").style.backgroundColor = eee
@Raymo111
Raymo111 / UWaterloo Mail.md
Last active January 23, 2022 23:37
How to connect to UWaterloo's new email system via any mail client

How to connect to UWaterloo's new email system via any mail client

By Raymond Li (Raymo111), July 1st, 2020 (Happy Canada Day!)

Last updated 12 Sept 2021
Credits to PixlOne for O365Interactive mode and headless Davmail

Step 1: Get Davmail.

  • I'm on Arch Linux, so I installed it from the AUR.
@Raymo111
Raymo111 / cs241-mips.xml
Last active January 27, 2022 19:19
CS 241 MIPS KSyntaxHighlighting
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="CS 241 MIPS" version="1" kateversion="5.0" section="Assembler" extensions="*.asm;*.hex;" mimetype="text/x-mips" author="Raymond Li" priority="1">
<highlighting>
<list name="type">
<item>.word</item>
</list>
<list name="rinstr">
<item>add</item>
<item>sub</item>
@Raymo111
Raymo111 / CMakeLists.txt
Created March 29, 2022 23:00
CS 136 CMakeLists
cmake_minimum_required(VERSION 3.16)
project(CS_136 C)
##################################################
set(ASSIGNMENT Final)
##################################################
find_package(LLVM REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
@Raymo111
Raymo111 / SSH Over 443.md
Last active August 4, 2023 04:00
How to SSH over 443 while Apache runs SSL with socat, stunnel4 and sslh

Konsole delete word

By Raymond Li (Raymo111) 29 August 2021

To map shortcuts like Ctrl+Bksp/Del to delete words backwards and forwards in Konsole:

  1. Go to Settings > Edit Current Profile... > Keyboard > Edit...`
  2. Edit (or add) the following key combos if they don't already exist:
Key Combination Output (Explanation)
Backspace-Ctrl \x7f Backspace without Ctrl should just delete the character before the cursor
Backspace+Ctrl \E\b Backspace with Ctrl should delete the word before the cursor. ^H should be encoded as \x08 (ascii control character code in hex) but Konsole converts that to \b, it's code for backspace.
@Raymo111
Raymo111 / Automatic Dislocker.md
Last active October 31, 2023 12:33
Automatic Dislocker

Automatic Dislocker

By Raymond Li (Raymo111), October 1st, 2019

You'll need to have Dislocker installed, obviously. You'll also need accessible folders at /media/bitlocker/dislocker-file and /media/bitlockermount

  1. Download the script
    mkdir -p ~/scripts && wget +x https://gist.github.com/Raymo111/964f8c5943a64919a324b5f92ac5874b/raw/72d3b9c23189e0e1a55de7aab22578773b8f133c/dislocker.sh ~/scripts/dislocker.sh
    
@Raymo111
Raymo111 / archinstall.md
Last active April 6, 2024 09:09
Arch Linux Install with BTRFS, LUKS, and systemd-boot, dual-booted with a UKI and Windows 11 on a shared EFI partition

Arch Linux Install with BTRFS, LUKS, and systemd-boot, dual-booted with a UKI and Windows 11 on a shared EFI partition

By Raymo111

Last updated 2023-08-06

Disclaimer: I have personally tested every step of this. However, I'm not responsible for anything you do.

Pre-install

  1. Boot Windows, install the latest updates, remove OEM bloatware, open Disk Management, and shrink the Windows partition to make room for Arch.
  2. Download the latest Arch ISO and flash it with Etcher.
  3. Control Panel &gt; Power Options &gt; Choose what the power buttons do &gt; Change settings that are currently unavailable > Uncheck Fast startup.