Skip to content

Instantly share code, notes, and snippets.

View gragera's full-sized avatar

Alberto Gragera gragera

View GitHub Profile
@iamthenuggetman
iamthenuggetman / sunshine-on-bazzite.md
Last active December 9, 2025 04:06
Sunshine on Bazzite with virtual display
  1. First connect whatever display you want to use Moonlight on. I'll be using a 65" Roku TV. I connected it to my laptop running Fedora and after my system detected it I use for p in /sys/class/drm/*/status; do con=${p%/status}; echo -n "${con#*/card?-}: "; cat $p; done to find which directory has the EDID file for me it's HDMI-A-1

  2. Copy that edid file to your home directory cp /sys/class/drm/card0-HDMI-A-1/edid ~/. Now get that edid file over to your Bazzite (streaming machine). I used LocalSend to transfer it.

  3. Create a directory to store this new edid file sudo mkdir -p /usr/local/lib/firmware then place the file in there sudo mv ./edid.bin /usr/local/lib/firmware/

  4. Add this new edid to your kernel args sudo rpm-ostree kargs --append-if-missing="firmware_class.path=/usr/local/lib/firmware drm.edid_firmware=HDMI-A-1:edid.bin video=HDMI-A-1:e"

  5. Reboot systemctl reboot. After you log back into Bazzite open up your Display Configuration window (right-click on desktop) and notice you h

@koenbok
koenbok / mac-tweaks.md
Last active April 23, 2022 22:37
My Favorite Mac Tweaks

Skip verifying disk images

defaults write com.apple.frameworks.diskimages skip-verify true

Always hide the Desktop

defaults write com.apple.finder CreateDesktop false; killall Finder

Make terminal logins fast

touch ~/.hushlogin

Disable most animations

# Defaults / Configuration options for homebridge
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others)
HOMEBRIDGE_OPTS=-U /var/lib/homebridge
# If you uncomment the following line, homebridge will log more
# You can display this via systemd's journalctl: journalctl -f -u homebridge
# DEBUG=*
@gonzalezreal
gonzalezreal / ios-cell-registration-swift.md
Last active March 5, 2025 02:07
iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

A common task when developing iOS apps is to register custom cell subclasses for both UITableView and UICollectionView. Well, that is if you don’t use Storyboards, of course.

Both UITableView and UICollectionView offer a similar API to register custom cell classes:

public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
@clementgenzmer
clementgenzmer / FBAnimationPerformanceTracker.h
Last active August 20, 2025 04:49
FBAnimationPerformanceTracker
/*
* This is an example provided by Facebook are for non-commercial testing and
* evaluation purposes only.
*
* Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL
* FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
@kentbrew
kentbrew / iphoneSimulatorLocation.md
Last active January 3, 2016 10:29
Finding the iPhone Simulator

Finding the iPhone Simulator

I keep blowing it and undocking the simulator and arrgh, where did it go?

Search for:

  • iPhone simulator.
  • ipad simulator
  • ios simulator
  • emulator