Skip to content

Instantly share code, notes, and snippets.

View f1yn's full-sized avatar

Flynn f1yn

View GitHub Profile
@f1yn
f1yn / nvidia_audio_fix.md
Created November 30, 2022 20:07
QEMU HDMI audio fix (for Nvidia cards)
@f1yn
f1yn / enable_gdm_synergy_not_a_script.md
Created November 14, 2022 05:36
Enable Synergy (correctly) at login on any Linux using GDM3

These commands come AS IS, WITH NO WARRANTY. I AM NOT RESPONSIBLE IF YOU BORK YOUR SYSTEM

Synergy on Linux - It's great when it works, but it's also a pain because most guides are intended for Ubuntu 18, which is absolutely useless now. Here is how I was able to setup Synergy at login on a Pop_OS 22.04, but should ALSO work for ANY distribution using GDM3 as it's login manager (i.e Fedora and/or Ubuntu).

Step 1

Install synergy. Make sure that synergyc is installed first (included in deb or rpm)

Step 2

@f1yn
f1yn / enable_vifo_not_a_script.sh
Last active November 14, 2022 05:14
VFIO Setup for GPU passthrough on Fedora 36 (Intel)
# This is not a bash script (notice the lack of #!). Please do not run this as a single bash script.
# These commands come AS IS, WITH NO WARRANTY. I AM NOT RESPONSIBLE IF YOU BORK YOUR SYSTEM
# Get these for later
sudo dnf install driverctl
# Install virt manager and friends
sudo dnf group install virtualization
# Get the BUSIDS of the cards
@f1yn
f1yn / demo-knob-injection-cheap.js
Created May 2, 2020 04:39
Demo Knob injection in storybook (extracted sample)
import React, { useContext } from 'react';
import { DocsContext } from '@storybook/addon-docs/blocks';
import { Source } from '@storybook/components';
/**
* Adapted from https://github.com/storybookjs/storybook/blob/master/addons/docs/src/blocks/Source.tsx
*/
const extractLines = (source, location) => {
const { startBody: start, endBody: end } = location;
const lines = source.split('\n');
@f1yn
f1yn / layout.css
Last active April 30, 2020 15:13
HAMR CSS Framework
/*
* HAMR Framework
* CORE LAYOUT MODULE -V:[0.5.5] -REV:[02/18/14]
*
* Copyright (c) 2013 - WorkingHands Group - Ronald Buckingham
* Released under the MIT licence
*
* NOTE: If this file size exceeds 8 Kb: it should be minified
* The 960 failsafe system
@f1yn
f1yn / iterative-let.js
Created August 12, 2017 03:34
Proper usage of the let keyword
// proper let usage
function properLetExample(){
let checked = Math.random() * 10;
if (checked > 5){
let name = 'bob marley';
console.log('name:', name); // should output 'name: bob marley
} else {
@f1yn
f1yn / gulp-del.js
Last active August 31, 2017 00:11
Proper clean function for gulp.
var del = require('del');
var gulp = require('gulp');
var buildDirectory = './path/to/something';
// the offical way to delete files (from del docs)
gulp.task('clean', ()=>{
return del.sync(buildDirectory);
});
@f1yn
f1yn / darkwork.css
Last active June 10, 2017 03:17
Darkwork - Stylus CSS theme for Upwork
body {
color: #eee;
}
.h1,
.h2,
.h3,
.h4,
.h5,
h1,
h2,