Skip to content

Instantly share code, notes, and snippets.

View testman42's full-sized avatar
:octocat:
Converting caffeine into code

testman42

:octocat:
Converting caffeine into code
View GitHub Profile
@ShittyKopper
ShittyKopper / lemmy.user.css
Last active December 19, 2023 07:49
Userstyle "lemmy for the old.reddit.com refugee"
/* ==UserStyle==
@name lemmy for the old.reddit.com refugee
@namespace github.com/ShittyKopper
@version 1.0.1
@description tweaks
@author @ShittyKopper@lemmy.blahaj.zone
@updateURL https://gist.githubusercontent.com/ShittyKopper/7c812a68b815fa6f93501e0596c2cdee/raw/lemmy.user.css
==/UserStyle== */
@-moz-document domain("beehaw.org"),
regexp("https?://lemmy.*")
@bramreth
bramreth / Godot4FPS.gd
Last active April 12, 2024 22:59
The code for a first person movement youtube tutorial in Godot 4
extends CharacterBody3D
const SPEED = 5.0
const JUMP_VELOCITY = 4.5
# Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
@onready var neck := $Neck
@onready var camera := $Neck/Camera3d
@aaronfranke
aaronfranke / convert-to-godot4.sh
Last active April 2, 2024 16:20
This script bulk-renames many things in Godot 3 projects to hopefully make it easier to convert them to Godot 4.
#!/usr/bin/env bash
# This script bulk-renames many things in Godot 3 projects to hopefully
# make it easier to convert them to Godot 4. The goal is to do as much
# replacing as possible here so that the diffs Godot produces are smaller.
set -uo pipefail
IFS=$'\n\t'
# Loops through all text files tracked by Git.
@t3chguy
t3chguy / faq.md
Last active April 11, 2022 20:01
Element Spaces Beta FAQ

Why can't I see some rooms in a space

Currently you can only see rooms you are either joined to or which have History Visibility set to Anyone. Without one of those you are unable to fetch details about the room such as name/avatar/topic/members which is needed for the UI. The solution for this in the long term is matrix-org/matrix-spec-proposals#3173 which will allow you to fetch the necessary details for any room if you are able to join it without requiring an invite.

For the private space/rooms edge of this is matrix-org/matrix-spec-proposals#3083 which will allow members of a space access to a room which would also grant them access to its metadata to be able to see it prior to joining it.

Another situation which might cause this issue is if you are joined to some rooms but they are contained within a subspace you are not joined to; unsure of what the final solution will be here but once /peek MSC is stable that might provide a solution - https://github.com/vector-im/ele

@strycore
strycore / lutris-cla.md
Last active January 25, 2021 13:21
Lutris CLA

In order to contribute to Lutris, you have to agree with the terms of this document.

This Contributor License Agreement is not a typical one and doesn't cover legislative aspects of the project. This CLA is intented to keep the project running smoothly and staying in focus with our goals.

Lutris is a large project run by a small team. Contributions that don't follow certain rules can slow down development and cause major breakages. The code base has accumutated some technical debt over the years and it is extremely important not to add any.

By sending a patch to the lutris repository, you agree to the following rules:

  • No breakage of any of our oldest supported distributions. This means no introduction of unsupported Gtk or Python features.
  • The code should pass automatic QA tests. Docstrings for all newly created functions, methods and modules must be provided.
@Zackptg5
Zackptg5 / Making a DualBoot Mod for TWRP.md
Last active December 3, 2023 14:07
Making a DualBoot Mod for TWRP

Making a DualBoot Mod for TWRP

I no longer have a device where this is capable but there's a growing interest in it so figured I make a guide on it

What you will need

  • A working brain
  • Magisk zip
  • Some binaries (Some of these are included in twrp but varies by device so I'd just pack your own)
    • From magisk zip: busybox, magiskboot, magiskinit (rename magiskinit64 to magiskinit and use it if device is 64bit)
  • For ext4 partitions: e2fsdroid, mke2fs
@dpanter
dpanter / cpu_usage_per_core.sh
Last active December 19, 2023 07:50
cpu_usage_per_core.sh - Outputs per-core CPU use percentage, space separated one-liner.
#!/bin/bash
# cpu_usage_per_core.sh
# Outputs per-core CPU use percentage, space separated one-liner.
# Created 2020-05-14 - updated 2020-08-13
# Written for Siduction (Debian sid based distro)
# By dpanter https://gist.github.com/dpanter
# requires _mpstat_ (provided by Debian package _sysstat_)
# Failsafe for awk arithmetic ops, if locale uses comma decimal separator
LC_NUMERIC="C"
@NovemberDev
NovemberDev / godot_async_scene_loader.gd
Last active February 10, 2024 22:57
Asynchronously loads scenes in godot
# Loads a scene in the background using a seperate thread and a queue.
# Foreach new scene there will be an instance of ResourceInteractiveLoader
# that will raise an on_scene_loaded event once the scene has been loaded.
# Hooking the on_progress event will give you the current progress of any
# scene that is being processed in realtime. The loader also uses caching
# to avoid duplicate loading of scenes and it will prevent loading the
# same scene multiple times concurrently.
#
# Sample usage:
#
@op-ct
op-ct / virtualbox_create_vm.sh
Last active December 19, 2023 07:51 — forked from mitsuji/create_vm.sh
VirtualBox create vm shell script
#!/bin/sh
#
# adapted from https://gist.github.com/mitsuji/8397836
#
# For usage, run without arguments
#
VM_NAME=$1
DVD_PATH=${2:---}
OS_TYPE="${3:-${OS_TYPE:-RedHat_64}}"