Skip to content

Instantly share code, notes, and snippets.

@0rbadvent
0rbadvent / 0_Situation.txt
Created January 5, 2018 00:23 — forked from PedroHLC/0_Situation.txt
VGA Passthrough Situation Diagnose
Passing GTX780 at BUS 5 (PCIEX4)
OVMF: works even from the moment bios starts - weird perfomance - fps variates a lot,
ACUnity and RE6 runs at half fps it should, system interface is
almost as smooth as native.
SeaBios: tested only Windows setup, which also works, I can see bios working too.
Passing GTX780 at BUS 1 (PCIEX16)
OVMF: error code 43
SeaBios: error code 43
Even with MSI forced, audio through HDMI is sometimes cracking, sometimes not,
@pydanny
pydanny / django_local_settings.py
Last active December 12, 2018 12:31
running local unverified SSL on Django and Flask (don't do this in production!!!)
from .common import * # noqa
DEBUG = True
INSTALLED_APPS += ('django_extensions',)
# Snip all the other stuff
@franciscocpg
franciscocpg / remount.sh
Created September 1, 2017 01:21 — forked from ertseyhan/remount.sh
Temporarily increase size of tmp folder on Arch linux
#!/bin/bash
sudo mount -o remount,size=10G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."
@pigfrown
pigfrown / gist:897692efb82351f64ff5c2bca4bd4f4e
Created June 18, 2017 10:07
Starting an Xorg server via ssh
By default on Arch Linux only console users can start xorg-server.
Edit/create /etc/X11/Xwrapper.config and add the following:
allowed_users=anybody
can now start xorg via ssh with the following command:
ssh -nqxT $HOSTNAME "startx -- vt7 < /dev/null > /path/to/log/xremotelog 2>&1"
@danginsburg
danginsburg / Build RADV with LLVM static libs
Last active January 5, 2018 01:01
Build RADV with LLVM static libs
This was done using:
LLVM from padoka PPA: llvm-5.0-dev 1:5.0~svn303494-0~x~padoka0
First, I needed to patch configure.ac to get the static libraries for LLVM:
diff --git a/configure.ac b/configure.ac
index 5caf316..7bf0fd9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2585,7 +2585,7 @@ if test "x$enable_llvm" = xyes; then
@2E0PGS
2E0PGS / gigabyte-usb3-fix.md
Last active May 2, 2024 11:56
GIGABYTE GA-970A-DS3 USB3 fix for Ubuntu x64

Ok so for anyone with "GIGABYTE GA-970A-DS3" I have done alot of testing and research. The best config I found to get USB3 working is this:

Edit Grub config:

sudo nano /etc/default/grub

Edit the line that looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

@ansulev
ansulev / install-arch-linux-on-btrfs-subvolume-inside-luks
Last active June 30, 2024 03:07
Install Arch Linux with full encrypted btrfs subvolume inside luks
# Install Arch Linux with full encrypted btrfs subvolume inside luks
# Hardware: BIOS system, Intel GPU, Nvidia Optimus, Toshiba SSD, Wifi
# Please adjust for your needs.
# filename: install-arch-linux-on-btrfs-subvolume-inside-luks.txt
# The official guide: https://wiki.archlinux.org/index.php/Installation_Guide
# Download the archiso image from https://www.archlinux.org/download/
# Copy to a usb-drive
dd bs=4M if=archlinux.iso of=/dev/sdx status=progress oflag=sync # on linux
@franciscocpg
franciscocpg / generate.sh
Last active January 27, 2018 20:08
Self signed certificate
set -e
while [[ -z "$domain" ]]; do
echo -n "Domain:"
read domain
done
openssl genrsa -des3 -passout pass:x -out "$domain.pass.key" 2048
openssl rsa -passin pass:x -in "$domain.pass.key" -out "$domain.key"
rm "$domain.pass.key"
openssl req -new -key "$domain.key" -out "$domain.crt"
@xenithorb
xenithorb / xorg.conf
Last active January 5, 2018 01:21
Current xorg.conf for a 3x 1080p monitor side-by-side setup (with the left most 90^o rotated)
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 364.15 (mockbuild@) Fri Apr 8 12:50:17 CEST 2016
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
@T4cC0re
T4cC0re / secureit.sh
Last active January 27, 2018 20:09
Secure SSH access (as root)
#/usr/bin/env bash
# this assumes you have installed your public key and have means to access to the server.
rm -rf /etc/ssh/ssh_host_*
ssh-keygen -A
passwd -d root
sed -i 's/^[# ]*PermitRootLogin [^\r\n\]\+$/PermitRootLogin without-password/gmi' /etc/ssh/sshd_config
sed -i 's/^[# ]*ServerKeyBits [^\r\n]\+$/ServerKeyBits 2048/gmi' /etc/ssh/sshd_config
sed -i 's/^[# ]*PermitEmptyPasswords [^\r\n]\+$/PermitEmptyPasswords no/gmi' /etc/ssh/sshd_config
sed -i 's/^[# ]*PubkeyAuthentication [^\r\n]\+$/PubkeyAuthentication yes/gmi' /etc/ssh/sshd_config
sed -i 's/^[# ]*PasswordAuthentication [^\r\n]\+$/PasswordAuthentication no/gmi' /etc/ssh/sshd_config