Skip to content

Instantly share code, notes, and snippets.

@iliketwertles
iliketwertles / nvidia.md
Created August 29, 2022 22:56
nvidia+hyprland/wayland guide

First of all this is no where near a cure-all or universal guide, this is just my experience with my specific card and system. This is what has gotten my MSI 1650 Super Gaming X gpu (probably overly specific lol) to work on hyprland, not sure if this works on any other wayland compositors but i assume it would work for sway, newm, etc

Anyways lets start with a basic arch install with the regular kernel and some basic packages including but not limited to: dkms, base-devel, git, yay, etc

Next is to get nvidia stuff figured out, if your card is supported, use nvidia-open-dkms, if not, nvidia-dkms. Then ensure nvidia modules are in the MODULES= section of mkinitcpio like this (MODULES="nvidia nvidia_drm nvidia_modeset nvidia_uvm") then running: "mkinitcpio -P". I suggest making a packman hook to rebuild initramfs whenever either 'linux' (kernel) or nvidia-open-dkms

@TheSunCat
TheSunCat / usb-sounds-udev.md
Last active August 14, 2022 14:24
USB Sounds on Linux using udev!

This is an overview of how I configured my system to play a sound when a USB device (such as a flash drive) is plugged in.

Requirements

  • Linux install with udev and systemd.
  • Root access.
  • A utility to play sounds (I used aplay).
  • Sounds to play.

Playing a sound

Using the tool aplay (found in the Arch package alsa-utils), it is easy to play an audio file: aplay insert.wav

@dixyes
dixyes / Readme.md
Last active May 6, 2024 14:22
ASUS ROG Zephyrus G14 2022 GA402RJ pci passthrough

ASUS ROG Zephyrus G14 2022 GA402RJ pci passthrough

This is a record for my own passthrough setup, I can finally use a single laptop for windows gaming and linux programming at the same time.

The device

My G14 is GA402RJ(6800HS + 6700s) with MT7922 WiFi/BT card.

At this time, BIOS version is 309.

#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
using System.IO;
using System.Text;
public class EditorFontResizer : EditorWindow {
@TheSunCat
TheSunCat / DisblockOrigin.theme.css
Last active October 30, 2024 05:38
Hide all Nitro & Boost upsells in Discord!
/**
* @name Adblock for Discord
* @author TheSunCat and contributors
* @version 1.0.0
* @description We have moved to Codeberg! Follow the link below:
* @source https://codeberg.org/AllPurposeMat/Disblock-Origin
*/
#app-mount::before {
content: "The Disblock Origin theme has moved to Codeberg! Please check https://codeberg.org/AllPurposeMat/Disblock-Origin";
@MeguminSama
MeguminSama / Discord Experiments.js
Last active November 4, 2024 14:23
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";
@shibbo
shibbo / output.txt
Last active February 5, 2020 03:03
Loaded Packet #0 with length 27
Loaded Vector: (X: -11599 Y: 3447 Z: -3)
Loaded Vector: (X: 8 Y: 8 Z: 8)
Z Rotation: 0
Y Rotation: 0
X Rotation: 255
Animation Hash: 4291431497
Sets BCKCtrl value to: 32
Set Track Weight #0 to 2
Set Track Weight #1 to 0