Skip to content

Instantly share code, notes, and snippets.

View Raymo111's full-sized avatar

Raymond Li Raymo111

View GitHub Profile
@Raymo111
Raymo111 / dilbert.sh
Created October 25, 2019 02:30
Dilbert Crawl
#!/bin/bash
start=$1
case "$2" in
"") end=$1 ;;
*) end=$2 ;;
esac
start=$(date -d $start '+%Y-%m-%d')
end=$(date -d $end '+%Y-%m-%d')
[ -d Dilberts ] || mkdir Dilberts
@Raymo111
Raymo111 / Setup a Raspberry Pi.md
Last active June 5, 2020 09:32
How to Setup a Raspberry Pi
@Raymo111
Raymo111 / Bash.md
Last active November 26, 2020 06:19
Cheetsheets for everything programming/software related
@Raymo111
Raymo111 / Std Alphabet.md
Last active November 26, 2020 06:20
Standardized English Alphabet

a ("a-ee", "a" like in "aha")

bee

cee ("c" pronounced like "ts" in "its")

dee

e ("ay-ee", "ay" like in "day")

@Raymo111
Raymo111 / Just in case we need this.md
Created April 3, 2020 15:11
Dyno settings for CS '25

Welcome

{user}, welcome to {server}! Please use `?iwillabidebyallserverrules yourname yourprogram` here to get started!

By doing so, you acknowledge that you have read this message in its entirety and agree to abide by all server rules. Note that you will be kicked out if you enter inappropriate info. This includes that `yourname` must be your *actual* firstname, or firstname and last initial.

Use `?ranks` to show all programs, and `?rules` to show all server rules.

If you are not in any of the listed programs, please choose `spy` :)
@Raymo111
Raymo111 / keybase.md
Created December 2, 2020 22:45
Keybase proof of ownership

Keybase proof

I hereby claim:

  • I am Raymo111 on github.
  • I am raymo111 (https://keybase.io/raymo111) on keybase.
  • I have a public key whose fingerprint is 64C2 FB18 E104 7522 9FFF 25D1 F058 DF98 2DB4 2F9D

To claim this, I am signing this object:

@Raymo111
Raymo111 / Raymond Li (Raymo111) (2021-02-01 4_18_15 PM).html
Created February 1, 2021 21:30
Personal website (snapshot at 2021-02-01 4:18:15 PM) to be sent to the moon thanks to u/Valphon
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html class="desktop mbr-site-loaded" style>
<!--
Page saved with SingleFile
url: https://raymond.li/
saved date: Mon Feb 01 2021 16:18:15 GMT-0500 (Eastern Standard Time)
____ ____ _ ___ _____
/ ___| _ \| | / _ \ |___ /
| | _| |_) | | _____| | | | |_ \
| |_| | __/| |__|_____| |_| | ___) |
@Raymo111
Raymo111 / pwrstatd-powerfail.sh
Last active August 21, 2021 23:24
UPS battery power notification
#!/bin/bash
#.
#.
#.
# (append this)
# Send a desktop notif
sudo -u raymo DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "Warning: Utility power has failed. Now running on battery." -i battery-caution -u critical -t 10000 -h 'string:desktop-entry:ups' -a UPS

1920x1080 HD webcam on Linux

By Raymond Li (Raymo111)

Last updated 8 Sept 2021

So your webcam is giving you a 5:4 low-res video and you can't do anything about it?

  1. Load the v4l2loopback kernel module:
sudo depmod -a
sudo modprobe v4l2loopback devices=1 max_buffers=2 exclusive_caps=1 card_label="VirtualCam"

You can do this persistently by creating a config file like video.conf in /etc/modprobe.d/ with the following in it: