Skip to content

Instantly share code, notes, and snippets.

View sunjerry019's full-sized avatar

Sun Yudong sunjerry019

View GitHub Profile
@ioquatix
ioquatix / README.md
Created April 16, 2020 03:52
How to setup v4l2 loopback for use with OBS.

Firstly, you need to install v4l2loopback and obs-v4l2sink. On arch linux with yay:

yay -Syu obs-v4l2sink v4l2loopback-dkms

Then, set up a systemd service:

koyoko% cat /etc/systemd/system/v4l2loopback.service 
@epyonavenger
epyonavenger / arch_enable_bbr.md
Last active September 30, 2024 19:35 — forked from sendya/ArchLinux_Kernel4.13_enable_BBR.sh
Arch Linux - Enable BBR

Enabling BBR On Arch Linux 6.5.5+

Become Root
  • sudo su
Set Up sysctl Config File
  • echo "net.core.default_qdisc=fq_codel" >> /etc/sysctl.d/bbr.conf
  • echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.d/bbr.conf
Load Module
@jiewpeng
jiewpeng / add_anaconda_right_click_menu.md
Last active September 5, 2024 23:03
Add Anaconda Prompt to Windows right click context menu

This gist describes how to add Anaconda Prompt to the Windows right click context menu. This is because at some point, Anaconda no longer adds itself to the PATH after installation.

  1. Run regedit.exe
  2. Navigate to HKEY_CLASSES_ROOT > Directory > Background > shell
  3. Add a key named AnacondaPrompt and set its value to "Anaconda Prompt Here" (or anything you'd like it to appear as in the right click context menu)
  4. Add a key under this key, called command, and set its value to cmd.exe /K C:\Anaconda3\Scripts\activate.bat (may have to change the activate.bat file to whereever Anaconda is installed)

Problem

In Arch Linux mkinitcpio -p linux

shows

Possibly missing firmware for module: aic94xx
 Possibly missing firmware for module: wd719x
@jigpu
jigpu / wacom-gnome-compat.sh
Last active September 21, 2020 17:19
Script to remap pad buttons on consumer (Bamboo) Wacom devices to be compatible with GNOME
#!/bin/bash
# Consumer Wacom devices (i.e. most Bamboo devices like the Bamboo Pen & Touch,
# Bamboo Fun, Bamboo Connect; and the newer non-pro Intuos devices like the
# Intuos Draw and Intuos Art) have a hardware button mapping that is incompatible
# with GNOME. This incompatibility prevents the GNOME Control Center's Wacom panel
# from working properly, and often also prevents at least one button from working
# entirely.
#
# This script can be used to discover a software mapping that can be applied by
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active December 12, 2024 04:12
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3
@garrettdreyfus
garrettdreyfus / yesOrNo.py
Last active November 18, 2024 11:01
Dead simple python function for getting a yes or no answer.
def yes_or_no(question):
reply = str(raw_input(question+' (y/n): ')).lower().strip()
if reply[0] == 'y':
return True
if reply[0] == 'n':
return False
else:
return yes_or_no("Uhhhh... please enter ")
@netj
netj / memusg
Last active December 20, 2024 15:24
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #