Skip to content

Instantly share code, notes, and snippets.

View CoolElectronics's full-sized avatar

~coolelectronics CoolElectronics

View GitHub Profile
@CoolElectronics
CoolElectronics / Xorg.md
Last active January 16, 2024 15:14
Boycott Xorg. It breaks everything!!

Hello! This is a parody of the infamous "boycott wayland" thread. Meant to be a reference of issues, instead of tracking actual flaws with the wayland ecosystem or pointing out helpful resources or alternatives, the creator mostly cites secondhand anecdotes, personal opinions, and outdated or provably false statements. When commenters tried to point out the outdated information and suggest improvements to the gist, their comments were either deleted, harrassed by the creator of the gist, or edited to include homophobic remarks.

Do not take anything here seriously, I made this mostly as a joke. If you have extra things to add leave them in comments (i won't harass you)

Think twice before using Xorg over Wayland. It breaks everything!!

Xorg breaks Gnome

@CoolElectronics
CoolElectronics / chromeos-117-sudo-howto.md
Last active April 29, 2024 14:50
Re-Enable sudo from crosh on R117+ Chrome OS without recompiling

Short guide on how to bypass this:

image

If you haven't disabled rootfs verification, switch to vt-2 and run /usr/libexec/debugd/helpers/dev_features_rootfs_verification. Then reboot.

Inside crostini, download minioverride.c and compile it with gcc minioverride.c -o minioverride.so -shared (make sure gcc is installed)

In the files app, move minioverride.so into your downloads folder.

@CoolElectronics
CoolElectronics / rickroll.c
Last active August 9, 2023 17:23
linux pcspkr rickroll in C
/* compile:
```
gcc rickroll.c
sudo ./a.out
```
MUST BE RUN AS ROOT
*/
#include <fcntl.h> // open
#include <linux/input.h> // struct input_event
#include <linux/kd.h>
@CoolElectronics
CoolElectronics / delinker.sh
Last active February 20, 2024 19:07
convert compiled binary into static binary
mkdir libs
cp $(ldd bin | sed -e "s/ (.*//" -e "s/\t//g" -e "s/.*=> //" | grep -v "linux-vdso.so.1") libs
# to execute the program, libs/linker.so --library-path libs /path/to/binary
# ty r58 for the fix
@CoolElectronics
CoolElectronics / stati.js
Created December 19, 2022 04:23
status changer
/**
* @name StatusChanger
* @author CoolElectronics
* @description Switches status every hour or so
* @version 0.0.1
*/
var server;
const statuses = [
"they go here",
@CoolElectronics
CoolElectronics / vpkunpack.py
Created August 21, 2022 22:17
Unpacker for source VPK files on linux
#!/usr/bin/python
import vpk
from pathlib import Path
import os
pakdir = "pak01_dir.vpk"
pak1 = vpk.open(pakdir);
os.mkdir("pak01")
for filepath in pak1:
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SaveStatesManager : MonoBehaviour
{
public List<SavedGameObject> savedState;
public void SaveState()
{
var numPointsSlider = 0, turnFractionSlider = 0;
var LastNumPoints = 0, LastTurnFraction = 0;
var numPoints = 0, turnFraction = 0;
var points = [];
var powSlider;
var LastPower;
var speedSlider;
var angleOffset = 0;
function setup(){
createCanvas(800,800);