Skip to content

Instantly share code, notes, and snippets.

View brettp's full-sized avatar

Brett Profitt brettp

View GitHub Profile
@russiantux
russiantux / gamescope_4_Ubuntu24-04.md
Last active November 17, 2024 02:27
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

@kinoc
kinoc / trainLMS_pub.py
Last active October 26, 2020 16:01
Fine-tune GPT-2 1558M on a Titan RTX using IBM Tensorflow Large Model Support v2
#!/usr/bin/env python3
# Usage:
# PYTHONPATH=src ./train --dataset <file|directory|glob>
# Got 1558M to train on a TITAN RTX using IBM Tensorflow_Large_Model_Support
# TLMS can insert explicit swaps in the graph between GPU and CPU, to extend the memory
# But the graph has While_Loop, so you have to use the TFLMSv2 version (which works with TF 1.x)
#
# Download, expand, get the egg out and install.
@KurtJacobson
KurtJacobson / touchscreen_calibration.md
Last active February 27, 2024 22:06
Touchscreen calibration procedue for Debian9 (stretch)

Touchscreen Calibration in Debian9

Unfortunately [xinput-calibrator][1] does not work at all for calibrating a touchscreen in Debian9. This is apparently because X server now uses libinput to handle input devices instead of evdev. I spent huge amount of trying to fiddling with xinput-calibrator and 99-calibration.conf files until I finely found this [issue][2] on GitHub that gave me some hints as how to proceed. This is mostly for my own reference, but I hope it might also help others in the same situation.

@jvcleave
jvcleave / distccd-rpi.plist
Last active April 30, 2024 06:27
mac distcc install instructions
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>distccd-rpi</string>
<key>Program</key>
<string>/Users/YOUR_USER_NAME/Scripts/launchd-distccd.sh</string>
<key>RunAtLoad</key>
<true/>
@ubershmekel
ubershmekel / json_history_to_kml.py
Last active June 19, 2024 07:35
Convert LocationHistory.json from Google takeout of location history (latitude) to a usable KML file for viewing in Google Earth.
"""
Convert LocationHistory.json from Google takeout of location history (latitude)
to a usable KML file for viewing in Google Earth.
Usage:
python json_history_to_kml.py LocationHistory.json
@makasim
makasim / gist:3720535
Last active June 26, 2017 06:32
form partial bind
<?php
namespace Foo\CoreBundle\Form\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormInterface;
/**
* Changes Form->bind() behavior so that it treats not set values as if they
@brettp
brettp / android_stuff.md
Last active April 26, 2019 03:28
Copying the "SD card" contents between rooted Android devices that don't have a physical SD card using abd

Backup media partition

adb forward tcp:7080 tcp:8080
# from another terminal on same machine (or run adb cmd directly)
adb shell 'tar --exclude=/data/media/0/TWRP -Jcvf - /data/media | nc -p 8080 -l 1>/dev/null'

# original terminal
nc -w15 localhost 7080 &gt; media.tar.gz
@marijn
marijn / Example.php
Created April 3, 2012 16:53
An example on sorting Doctrine\Common\Collection\ArrayCollection elements
<?php
$collection = new Doctrine\Common\Collection\ArrayCollection();
// add objects to the collection that contain a getCreated method returning a DateTime instance
$iterator = $collection->getIterator();
$iterator->uasort(function ($first, $second) {
if ($first === $second) {
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2: