Skip to content

Instantly share code, notes, and snippets.

View brndls's full-sized avatar

Adek Lanin brndls

View GitHub Profile

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.

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, search "VR-Ready laptops", as those are definitely MUXed.
  • For MUXless configuration which the dGPU share display alongside with iGPU (integrated GPU), you may need to extract your system's vBIOS for your card to avoid getting no output from your screen. Refer [here](#blank-screen-output-when-i-passthrough
@brndls
brndls / docx2md.md
Created August 11, 2017 17:45 — forked from aembleton/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

@brndls
brndls / iterm2-solarized.md
Created December 17, 2016 21:24 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)

Solarized

@brndls
brndls / .gitignore
Created August 25, 2016 08:20 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@brndls
brndls / osx_uninstall_mysql_install_mariadb_homebrew.md
Created June 10, 2016 14:41 — forked from brandonsimpson/osx_uninstall_mysql_install_mariadb_homebrew.md
OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

OSX How To: Uninstall native MySQL and install MariaDB via Homebrew

This is a short overview on how to completely remove any old mysql server installs in OSX and upgrade to MariaDB without conflicts. Things can get a bit weird when you have various old installs of MySQL server floating around, and utilizing homebrew to install and upgrade MariaDB as a drop in replacement for MySQL has worked well, especially if you're used to managing MySQL installs via yum in linux.

First: Backup Your Data!

Backup all of your current databases with mysqldump

This isn't a tutorial on backups, and there are many ways to do it. You should know how to backup your data anyway. For this example, we'll do a full backup of our InnoDB databases.

@brndls
brndls / docker_install-ubuntu_trusty.sh
Last active May 23, 2016 17:35
Instalasi docker pada ubuntu 14.04
#!/bin/bash
# Prerequisites by Ubuntu Version
cp /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i -e 's/archive.ubuntu.com/kambing.ui.ac.id/' /etc/apt/sources.list
sed -i -e 's/security.ubuntu.com/kambing.ui.ac.id/' /etc/apt/sources.list
rm -rf /var/lib/apt/lists/*
apt-get update
apt-get install -y linux-image-extra-$(uname -r)
apt-get install -y wget nano screen apparmor htop
@brndls
brndls / github.css
Created April 20, 2016 15:39 — forked from theconektd/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@brndls
brndls / fix_homebrew.rb
Created April 19, 2016 11:13 — forked from rpavlik/fix_homebrew.rb
Fix permissions on /usr/local for Homebrew
#!/usr/bin/ruby
#
# This script fixes /usr/local only.
#
# 6th January 2010:
# Modified the script to just fix, rather than install. - rpavlik
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
config.vm.provider "virtualbox" do |vb|
host = RbConfig::CONFIG['host_os']
# Give VM 1/4 system memory & access to 1/2 cpu cores on the host
if host =~ /darwin/
cpus = `sysctl -n hw.ncpu`.to_i / 2
# sysctl returns Bytes and we need to convert to MB
mem = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 4
elsif host =~ /linux/
cpus = `nproc`.to_i / 2
# meminfo shows KB and we need to convert to MB