Skip to content

Instantly share code, notes, and snippets.

@ulkeshkosh
ulkeshkosh / pci-passthrough.md
Last active February 2, 2024 07:05
PCI-Passthrough Rig, OS, and Setup

Introduction

This is my guide for a successful PCI-Passthrough from Linux (Arch Linux) to QEMU/KVM via virt-manager and libvirtd into a Windows 10 Home guest.

NOTE: This is a guide for Intel only. I do not own an AMD machine, and will not add AMD information this guide until such time that I do, which could be never.

Hardware

Device Type Device
CPU Intel Core i7 7700K Quad-Core, Hyperthreading
Motherboard Gigabyte Z270X-Gaming 5
@mdPlusPlus
mdPlusPlus / compile_newest_stable_kernel_with_acso_patch.sh
Last active April 10, 2025 20:00
Download, patch, compile and install the newest stable Linux kernel with the ACS override patch (Ubuntu / Debian)
#!/bin/bash
function install_dependencies() {
echo "Installing dependencies..."
sudo apt -qq update
sudo apt -qq install -y curl git wget
# sudo apt -qq install -y bison flex kernel-package libelf-dev libssl-dev
sudo apt -qq install -y bison flex libelf-dev libssl-dev
}
@chuckreynolds
chuckreynolds / nightbot-commands-reference.md
Last active December 12, 2022 08:33
Nightbot commands reference for Twitch and sometimes youtube gaming. Most are accessible via google and reading many docs but I like to keep things in one location for reference. If you want to see something here lmk on Twitter: https://twitter.com/chuckreynolds or comment below.

General stuff

Add, Edit, Delete Commands

  • !addcom !keyword New text here
  • !editcom !keyword Edited version of the text here
  • !delcom !keyword

Reference the user whom entered command

  • $(user)

Reference user-entered text

KVM OSX Guest 10.11 (El Capitan) with Clover

  • Some notes about this approach:
    • An OSX Installer USB drive for Install OS X El Capitan is created
    • Clover is then installed on the USB drive
    • Clover Configurator is then run on the USB drive
    • The USB drive contents are copied to the VM host
    • VNC is used to connect to the guest UI
  • The qxl virtual video device is used (part of the standard kvm qemu install)
@andrassomogyi
andrassomogyi / AViewController.h
Created September 25, 2015 09:43
SFSafariViewController Objective-C example
#import <UIKit/UIKit.h>
@import SafariServices;
@interface AViewController : UIViewController
//
// ...
//
@end
@RGreinacher
RGreinacher / osxLaunchAtStartup.swift
Last active December 22, 2018 00:50
Swift / OS X: Launch app at startup
// Adding Login Items Using a Shared File List
// This is a combination of the code provided by the following Stackoverflow discussion
// http://stackoverflow.com/questions/26475008/swift-getting-a-mac-app-to-launch-on-startup
// (This approach will not work with App-Sandboxing.)
func applicationIsInStartUpItems() -> Bool {
return itemReferencesInLoginItems().existingReference != nil
}
func toggleLaunchAtStartup() {
@hauntedhost
hauntedhost / learn-haskell.md
Last active January 30, 2022 12:58
haskell learning resources

free:

# Basic Strongswan ikev2 server setup
* paltform: atlantic.net ubuntu 14.04 x64
* the commands below are run with root account
## Strongswan
```
apt-get install strongswan
apt-get install iptables iptables-persistent
```
@marvell
marvell / bitrix_server_settings.md
Created February 5, 2014 15:14
Bitrix: рекомендации по настройке сервера

Bitrix: рекомендации по настройке сервера

Двухуровневая структура web-сервера: nginx + apache2. PHP должен быть работать через apache-модуль. Настройки должны быть одинковыми как для apache-модуля, так и для cli.

Структура директорий

/var/www/example.com [root:root 0755]
/var/www/example.com/logs/ [www-data:www-data 0755]
/var/www/example.com/public/ [www-data:webdev 0775]
@jyap808
jyap808 / encrypt_decrypt_gpg_armor.go
Created January 4, 2014 01:12
Symmetrically encrypting a string into ASCII armored GPG format and then Decrypting it in Golang
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"code.google.com/p/go.crypto/openpgp/armor"
"fmt"
"io/ioutil"
"log"
)