Skip to content

Instantly share code, notes, and snippets.

View Raymo111's full-sized avatar

Raymond Li Raymo111

View GitHub Profile
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 26, 2024 00:27
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@Raymo111
Raymo111 / i3lock on wake from sleep or hibernate.md
Last active April 22, 2024 02:18
How to use i3lock to wake from suspend state
@rain1024
rain1024 / tut.md
Last active March 28, 2024 00:53
Install pdflatex ubuntu

PdfLatex is a tool that converts Latex sources into PDF. This is specifically very important for researchers, as they use it to publish their findings. It could be installed very easily using Linux terminal, though this seems an annoying task on Windows. Installation commands are given below.

  • Install the TexLive base
sudo apt-get install texlive-latex-base
  • Also install the recommended and extra fonts to avoid running into the error [1], when trying to use pdflatex on latex files with more fonts.
@aeris
aeris / clip.py
Created August 9, 2012 23:21
Copy/paste from command line with Klipper
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
import argparse, dbus, sys
bus = dbus.SessionBus()
klipper = bus.get_object('org.kde.klipper', '/klipper')
@renjieliu
renjieliu / Migrate Termux setup from Device A to Device B.md
Last active January 16, 2024 01:43
Migrate Termux setup from Device A to Device B

Follow below steps to migrate the setup of Termux from Device A to Device B

Step 1. Backup termux on device A and run below command one by one.

  • cd /data/data/com.termux/files
  • tar -zcvf ./termux-backup_20211031.tar.gz home usr
  • mv ./termux-backup_20211031.tar.gz /storage/[Device A ID]/Android/data/com.termux/files/termux-backup_20211031.tar.gz

Step 2. Restore the setup of Termux on Device B.

@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 / 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
@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 / 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 / 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.