Skip to content

Instantly share code, notes, and snippets.

@russiantux
russiantux / gamescope_4_Ubuntu24-04.md
Last active July 11, 2026 09:54
Build & install gamescope for fresh-install Ubuntu 24.04 (Noble Numbat)

Build & install gamescope for fresh-install Ubuntu 24.04 (Noble Numbat)

Due to what appears to be dependency issues, the gamescope package isn't avalible for Ubuntu 24.04. So here's a guide on how to build and install gamescope for Ubuntu 24.04

  1. Pull latest git of gamescope

$ git clone https://github.com/ValveSoftware/gamescope.git

  1. Install needed dependencies to build gamescope

`$ sudo apt install libbenchmark1.8.3 libdisplay-info1 libevdev-dev libgav1-1 libgudev-1.0-dev libmtdev-dev libseat1 libstb0 libwacom-dev libxcb-ewmh2 libxcb-shape0-dev libxcb-xfixes0-dev libxmu-headers libyuv0 libx11-xcb-dev libxres-dev libxmu-dev libseat-dev libinput-dev libxcb-composite0-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-res0-dev libcap-dev

@meetnick
meetnick / gist:b92caf5834f2fa0ec57032cb6872cdf2
Created December 30, 2021 13:52
Disable sound power save ubuntu
#!/bin/bash
# Check for current power save state
cat /sys/module/snd_hda_intel/parameters/power_save
cat /sys/module/snd_hda_intel/parameters/power_save_controller
# Immediately disable session power save
echo "0" | sudo tee /sys/module/snd_hda_intel/parameters/power_save
echo "0" | sudo tee /sys/module/snd_hda_intel/parameters/power_save_controller
# Disable power save forever
@Makeshift
Makeshift / tutorial.md
Last active June 23, 2026 16:27
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active May 5, 2026 16:15
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@plembo
plembo / DisableMFAForAADUser.md
Last active June 6, 2025 21:27
Disable MFA for an individual Azure AD User

Disabling MFA for an Azure AD User

Azure AD MFA is not enabled by default for AAD and Microsoft 365 users, but it will be if during setup an admin chooses to Enable Security Defaults on Azure AD (as most will when prompted to do so: after all, who in their right mind wouldn't require MFA?).

However, there are situations where being able to toggle MFA on or off for a particular user can be useful. For example, in a development or test tenant when working with sample code from Microsoft that doesn't account for MFA (like a simple Microsoft Graph console app). This procedure involves disabling Security Defaults on AAD.

@ByteHamster
ByteHamster / ConscryptProviderInstaller.java
Last active June 25, 2022 21:47
ConscryptProviderInstaller Proof-Of-Concept
/*
* This class would be distributed as a small library to be included in apps.
* The library does NOT need the (large) Conscrypt dependency.
*/
package de.danoeh.antennapod.core;
import android.content.Context;
import android.content.pm.PackageManager;
@Karewan
Karewan / Android: TLS 1.3 with OkHttp + Conscrypt on all Android versions (Tested on 4.1+)
Last active February 26, 2026 20:40
Android: TLS 1.3 with OkHttp and Conscrypt on all Android versions (Tested on 4.1+)
// Android 4.1+
dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
implementation 'org.conscrypt:conscrypt-android:2.5.2'
}
// Android 5.0+
dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'org.conscrypt:conscrypt-android:2.5.2'
@jpallari
jpallari / Dockerfile
Last active February 13, 2023 15:22
saml2aws Docker image
FROM debian:stable-slim
RUN apt-get update && \
apt-get install -y ca-certificates curl && \
rm -rf /var/lib/apt/lists/*
ENV SAML2AWS_VERSION=2.16.0
ENV SAML2AWS_DOWNLOAD_URL=https://github.com/Versent/saml2aws/releases/download/v${SAML2AWS_VERSION}/saml2aws_${SAML2AWS_VERSION}_linux_amd64.tar.gz
RUN curl -L "$SAML2AWS_DOWNLOAD_URL" -o saml2aws.tar.gz && \
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 13, 2026 23:40
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@juanpabloaj
juanpabloaj / logging_env.py
Last active July 8, 2025 13:42
python logging, log level with environment variable
import os
import logging
LOGLEVEL = os.environ.get('LOGLEVEL', 'INFO').upper()
logging.basicConfig(level=LOGLEVEL, format="%(asctime)s %(message)s")