Skip to content

Instantly share code, notes, and snippets.

@firelightning13
firelightning13 / [GUIDE] GPU Passthrough for Laptop with Fedora.md
Last active April 30, 2024 19:23
[GUIDE] GPU Passthrough for Laptop with Fedora

Abstract

This is a full guide for people who wanted to setup Windows 10/11 VM with QEMU/KVM hypervisor for laptops that configured with hybrid graphics card like Intel/AMD + NVIDIA. This process will take about 1 to 2 hours, depending on your system's performance.

There is another comprehensive guide you can follow here (shoutout to asus-linux team). It is more up-to-date than mine. I'll probably incorporate those information to my guide, but you are welcome to use this one as a reference!

Before we proceed:

  • This guide is exclusively for Fedora because this distro is quite different to set up than other distro such as Arch. I would say Arch is easier to setup than Fedora, but sometimes your prefer Fedora than Arch in terms of its usage & features.
  • This tutorial mostly focus on laptops with NVIDIA Optimus MUXed configuration when dGPU (dedicated GPU) can connect directly to HDMI/DP output. If in doubt, sea
@rocarvaj
rocarvaj / .vimrc
Created April 27, 2012 21:28
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 30, 2024 19:19
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@NathanWalker
NathanWalker / ns-if.directive.ts
Last active April 30, 2024 19:18
nsIf - Specialized NativeScript directive for Angular to optimize view show/hide with change detection under mobile constraints
import {
Directive,
ElementRef,
EmbeddedViewRef,
Input,
OnDestroy,
OnInit,
Optional,
TemplateRef,
ViewContainerRef,
@mvaisakh
mvaisakh / Bringup.md
Last active April 30, 2024 19:18
An Android Device Tree Bringup Guide

A small Device Tree Bringup Guide

Introduction

So, you guys might be wondering, how do these "Developers" get your favourite Custom roms, such as LineageOS, Paranoid Android etc., to their own devices. Well I'm here to Guide you on how to do it, specifically on how to bringup or make your own device tree from scratch or adapting.

Gist of this Guide: This is for people with genuine interest in Android OS porting/development. After going through this guide, you should be able to do a total device tree bringup on your own.

Prerequisite: Certain requirements are to be met before you start with this amazing journey.

@leocomelli
leocomelli / git.md
Last active April 30, 2024 19:17
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@Klerith
Klerith / instalaciones-nestjs.md
Last active April 30, 2024 19:13
Instalaciones recomendadas para el curso de Nest.js
@iros
iros / force.reqanimframe.js
Created April 15, 2016 19:49
force layout with d3.timer instead of tick loop
var force = d3.layout.force()
.charge(-150)
.linkDistance(30)
.size([width, height]);
d3.json("assets/500nodes.json", function(error, graph) {
if (error) throw error;
// Task 2:
// Connect the force layout to the nodes and links in our dataset
@bahamat
bahamat / time-machine.sh
Last active April 30, 2024 19:06
DNS-SD Bonjour service discovery for Time Machine volumes
#!/bin/bash -x
if [[ -z $1 ]]; then
printf 'Must supply a path\n'
exit 1
fi
# We want to advertise a consistent volume UUID that will survive reprovisions.
zone_uuid=$(zonename)
bonjour_name="$(hostname -s).local"
@dalechyn
dalechyn / anvil.ts
Created April 30, 2024 13:06
Start an anvil and otterscan with bun
import { createAnvil } from '@viem/anvil'
import 'dotenv/config'
import { $ } from 'bun'
import path from 'path'
import z from 'zod';
import { fromError } from 'zod-validation-error'
//////////////////////
// Env validation