Skip to content

Instantly share code, notes, and snippets.

View dragonfax's full-sized avatar

Jason Stillwell dragonfax

View GitHub Profile
@rondhi
rondhi / README.md
Last active August 3, 2024 03:24
How to stream games from OBS directly from Steam Deck's Gaming Mode

How to stream games from OBS directly from Steam Deck's Gaming Mode (as of 2023-02-26)

DISCLAIMER: As with any guide, please make sure to read through and understand everything before following the steps in this guide. I'm not responsible for you breaking anything on your own device. This guide assumes you have a little background with the linux command line as well as the text editor nano. If not, please educate yourself


Description: It's possible to stream Vulkan and OpenGL games from Gaming Mode on your Steam Deck. This guide is heavily based on robertkirkman's guide, which is linked multiple times throughout this guide. Much thanks to them


@danapplegate
danapplegate / parsec-azure-template.json
Last active November 22, 2023 08:26
An Azure template to automate the creation of a Parsec-ready server and network firewall Windows Server 2016 instance.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"defaultValue": "parsec-azure",
"type": "string"
},
"userName": {
"defaultValue": "parsec",
@lesovsky
lesovsky / bgwr-ckpt-report.sql
Created March 27, 2017 13:45
Report query for PostgreSQL' bgwriter/checkpointer.
SELECT
now()-pg_postmaster_start_time() "Uptime", now()-stats_reset "Since stats reset",
round(100.0*checkpoints_req/total_checkpoints,1) "Forced checkpoint ratio (%)",
round(np.min_since_reset/total_checkpoints,2) "Minutes between checkpoints",
round(checkpoint_write_time::numeric/(total_checkpoints*1000),2) "Average write time per checkpoint (s)",
round(checkpoint_sync_time::numeric/(total_checkpoints*1000),2) "Average sync time per checkpoint (s)",
round(total_buffers/np.mp,1) "Total MB written",
round(buffers_checkpoint/(np.mp*total_checkpoints),2) "MB per checkpoint",
round(buffers_checkpoint/(np.mp*np.min_since_reset*60),2) "Checkpoint MBps",
round(buffers_clean/(np.mp*np.min_since_reset*60),2) "Bgwriter MBps",
@jmazzi
jmazzi / calender_events.txt
Created April 20, 2016 14:39
Google Inbox & Gmail rule to bundle and label calendar invites
(*.ics AND has:attachment AND ("(GMT" OR "Invitation:"))
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@dragonfax
dragonfax / README.md
Last active April 17, 2018 02:32
output readings from a Griffin PowerMate USB on osx

I was toying around with my PowerMate USB on the Mac.

I noticed that in the PowerMate application, you can set triggers for mouse wheel scrolling. But some applications coughMAMEcough don't pick it up.

Investigating I found that it provides its spinner as a uncommon HID type. So applications ignore it, not knowing how to handle that.

The click is presented as a normal button though. So no big deal there.

  1. brew install libusb
  2. brew install hidapi
@yosssi
yosssi / go-nginx.md
Last active August 7, 2024 20:10
Go networking performance vs Nginx

1. Nginx

$ wrk -t12 -c400 -d2s http://127.0.0.1:8080
Running 2s test @ http://127.0.0.1:8080
  12 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.71ms    3.16ms  23.05ms   69.17%
    Req/Sec     3.44k     1.98k    7.80k    58.22%
  63697 requests in 2.00s, 17.86MB read
@m-decoster
m-decoster / webgl.dart
Last active September 4, 2023 09:05
A simple WebGL application in Dart to get you started.
library webglapp;
import 'dart:typed_data';
import 'dart:html';
import 'dart:web_gl';
import 'dart:async';
CanvasElement canvas = document.getElementById("gameCanvas");
RenderingContext gl;
@jesstelford
jesstelford / pr-compare.sh
Last active September 10, 2024 02:16
List the Pull Requests which have been merged into one branch but not another. Execute this from within a git directory that has it's `origin` remote set to github.
#!/bin/sh
if (( $# < 2 )) || (( $# > 3 ))
then
echo "$0 <are-in-this-branch> <are-not-in-this-branch> [<url-of-repo>]"
exit 1
fi
URLPREFIX=
if (( $# == 3 ))
then
URLPREFIX=$(echo "$3/pull/" | sed -e 's/[\/&]/\\&/g')