Skip to content

Instantly share code, notes, and snippets.

@pythoninthegrass
pythoninthegrass / game.sh
Last active November 4, 2024 20:11
sunshine, gamescope + steam
#!/usr/bin/env bash
# TODO: test wayland gamescope session
export DISPLAY=:0 # vnc
export WAYLAND_DISPLAY=:2 # xwayland
export DXVK_HDR=1
export ENABLE_GAMESCOPE_WSI=1
# Check existing X server
start_x() {
@robertkirkman
robertkirkman / README.md
Last active December 28, 2024 17:47
How to record or stream SteamOS 3.X Gaming Mode

How to record or stream SteamOS 3.X in gamescope (Gaming Mode)

Here is another method that uses Flatpak and obs-vkcapture, which don't meet my personal needs but are very likely to be useful for you. In the comments there there is also an obs-gstreamer method.

Here is another method for recording that has its own GUI for Gaming Mode built with Decky Loader.

Force SteamOS to behave very much like Arch Linux

Key phrase: very much like, not identical. Always treat this as more unstable than Manjaro and only expect support with it in my comments section here.

  1. Set a password (if you haven't already) and disable read-only rootfs (yes this means after updating SteamOS [not Steam Client] this will all be deleted and you will have to do all this again if you want
@strzlee
strzlee / gamescope-session.sh
Created February 7, 2022 09:45
gamescope-session
#!/bin/sh
source /etc/gamescope-session.conf
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
# Source environment from ~/.config/environment.d
set -a
for i in ~/.config/environment.d/*.conf ;
do
[[ -f "${i}" ]] && source "${i}"
@Asjas
Asjas / reset.css
Created May 19, 2021 07:09
Modern CSS Reset - Andy Bell
// https://piccalil.li/blog/a-modern-css-reset
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */
@keithdevon
keithdevon / hd-gutenberg-column-fix.css
Last active December 18, 2020 22:26
Gutenberg columns block alignment fix
:root {
--gutter: 32px;
}
@media screen and (min-width: 782px) {
/* For the '25's' in the 25 / 50 / 25 variation */
.wp-block-column[style='flex-basis:25%'] {
flex-basis: calc(var(--gutter) * 2) !important;
@andrsd
andrsd / customkeys.md
Last active March 19, 2020 12:23
Volume on Up/Down buttons for OSMC remote control in KODI

Place this in ~/.kodi/userdata/keymaps/customkeys.xml

<keymap>
 <visualisation>
  <keyboard>
   <key id="166">volumeup</key>
   <key id="167">volumedown</key>
   <key id="168">skipnext</key>
   <key id="169">skipprevious</key>
 playpause
@alexellis
alexellis / colour_cycle.py
Last active August 16, 2016 20:24
colour_cycle.py
# sunrise.py
# colors = [
# {"r": 0, "g": 0, "b": 0},
# {"r": 255, "g": 0, "b": 0},
# {"r": 0, "g": 255, "b": 0},
# {"r": 0, "g": 0, "b": 255},
# {"r": 255, "g": 255, "b": 255},
# {"r": 0, "g": 0, "b": 0}
# ]
@lurch
lurch / pizero_usb_internet.sh
Last active November 1, 2022 16:59
Script to automatically provide internet access to a PiZero connected to a Linux host over a USB-network (only tested on Ubuntu 14.04)
#!/bin/bash
# Automatically setup routing and DNS for a PiZero connected over a USB-network
# NOTE: Before running this script for the first time, you need to run the
# following two commands on your Linux PC
# sudo sysctl -w net.ipv4.ip_forward=1
# sudo iptables -t nat -A POSTROUTING -s 169.254.0.0/16 -o eth0 -j MASQUERADE
# (replace eth0 in the second command with your internet-facing network device,
# e.g. wlan0 on a laptop)
# The Avahi-discovered hostname
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
@paulirish
paulirish / what-forces-layout.md
Last active January 23, 2025 09:23
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent