Skip to content

Instantly share code, notes, and snippets.

View mdeguzis's full-sized avatar

Michael T. DeGuzis mdeguzis

View GitHub Profile
@andygeorge
andygeorge / steamdeck_ssh_instructions.md
Last active February 21, 2024 06:54
Steam Deck `ssh` instructions

These are manual instructions on enabling SSH access on your Steam Deck, adding public key authentication, and removing the need for a sudo password for the main user (deck).

This gist assumes the following:

  • you have a Steam Deck
  • you have a home PC with access to a Linux shell that can ssh, ssh-keygen, and ssh-copy-id
  • your Steam Deck and home PC are on the same local network, with standard SSH traffic (tcp/22) allowed over that network from the PC to the Steam Deck

NOTE: @crackelf on reddit mentions that steamOS updates blow away everything other than /home, which may have the following effects:

  • removing the systemd config for sshd.service, which would prevent the service from automatically starting on boot
  • removing the sudoers.d config, which would reenable passwords for sudo
@mdeguzis
mdeguzis / get-proton-ge.sh
Created August 22, 2020 17:59
get-proton-ge.sh
#!/bin/bash
# Author Michael DeGuzis
# Description: Simple script to grab the latest Proton GE without a git clone / build.
steam_type=$1
native=1
flatpak=1
steamos=1
if [[ -z ${steam_type} ]]; then
@jamesinc
jamesinc / aws-notification-timer.user.js
Last active February 7, 2024 22:20
AWS console notification dismisserator 9000 - dismiss AWS flash notifications after (about) 5 seconds
// ==UserScript==
// @name AWS console notification dismisserator 9000
// @namespace https://github.com/jamesinc
// @version 1.1
// @description Dismiss AWS flash notifications after about 5 seconds
// @author James Ducker
// @match https://*.console.aws.amazon.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
@vernhart
vernhart / rmvpc.py
Last active November 16, 2022 07:39
Deleting an AWS VPC with python's boto3
#!/usr/bin/env python
"""I was trying to programatically remove a Virtual Private Cloud (VPC) in
AWS and the error message was not helpful:
botocore.exceptions.ClientError: An error occurred (DependencyViolation)
when calling the DeleteVpc operation: The vpc 'vpc-c12029b9' has
dependencies and cannot be deleted.
Searching for a quick solution was not fruitful but I was able to glean some
knowledge from Neil Swinton's gist:

How to build wine2.9 staging which supports Blizzard's Overwatch

Overview

gamax92's wine repo has the DirectX11 overwatch patches already applied. We need to build this version of Wine with WOW64 support. That is, the 64-bit version of wine which also supports 32-bit Windows programs. In so many words: if your CPU is 32-bit only, don't bother and you couldn't run Overwatch anyway.

Building wine with WOW64 support requires boostrapping the final build. The three stages look like:

  1. Build the 64-bit version of wine (pass --enable-win64 to ./configure)
@noahcoad
noahcoad / json2yaml.py
Last active November 3, 2023 11:40
Python to convert json to yaml
#!/usr/bin/env python3
# convert json to yaml
# http://pyyaml.org/wiki/PyYAMLDocumentation
# python3 json2yaml.py < ~/code/manpow/moneybug/mbuploader/support/offices.json
# gist https://gist.github.com/noahcoad/46909253a5891af3699580b8f17baba8
import yaml, json, sys
sys.stdout.write(yaml.dump(json.load(sys.stdin)))
@flibitijibibo
flibitijibibo / flibitPackaging.md
Created June 17, 2016 16:00
Hope you like reading ldd output!

A week ago I was CC'd in on a thread about Linux packaging, and how to avoid doing it the wrong way (i.e. RPM, Deb, etc.). I've always used MojoSetup and I've never forced distributions to do any additional work, but this is still a new concept to a lot of people. Additionally, Amos suggested that I expand on Itch's FNA appendix, so here's a guide on how I package my games.

This is a bit of an expansion on my MAGFest 2016 presentation, which you can find here:

http://www.flibitijibibo.com/magfest2016/

https://www.youtube.com/watch?v=B83CWUh0Log

I would recommend looking at that first! After that, read on...

@learnitall
learnitall / Un-censor Studydotcom.txt
Created March 16, 2016 01:48
Neat little trick to gain access to full lessons on study.com without a paid membership
Uncensoring study.com lessons is actually pretty simple- it only requires devling into the developer-tools in Google Chrome
NOTE: This trick only unblocks the lesson transcripts, I haven't explored getting access to the full lesson video yet.
Here are the steps:
1. Go to a lesson of choice on study.com and open the developer-tools in Chrome (example URL:
http://study.com/academy/lesson/root-cap-function-definition-quiz.html)
2. Use the page inspector tool and select the "Lesson Transcript" text. Confirm that in the Elements tab of the dev tools,
the line "<span>Lesson Transcript</span>" is highlighted (should be under a div that has the id "transcriptHeader")
3. Hit the dropdown triangles of "<div class="transcriptContainer articleContent" data-cname="main_content>" and
<div id="mainArticle" class="transcript" data-cname="lesson_transcript"> (the latter should appear after the contents of
@RamonGilabert
RamonGilabert / bluetooth.sh
Last active October 12, 2023 18:24
Bluetoothctl automation
#!/usr/bin/expect -f
set prompt "#"
set address [lindex $argv 0]
spawn sudo bluetoothctl -a
expect -re $prompt
send "remove $address\r"
sleep 1
expect -re $prompt
@subfuzion
subfuzion / curl.md
Last active April 26, 2024 09:43
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.