Skip to content

Instantly share code, notes, and snippets.

@0rbadvent
0rbadvent / block_china_ufw.sh
Created December 30, 2017 19:27 — forked from lewg/block_china_ufw.sh
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
#!/bin/sh
# UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
# Based on http://www.wizcrafts.net/chinese-iptables-blocklist.html
# Cambodia (KH)
ufw deny from 114.134.184.0/21 to any port 22
# Chinese (CN) IP addresses follow:
ufw deny from 1.192.0.0/13 to any port 22
ufw deny from 1.202.0.0/15 to any port 22
@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,
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
@0rbadvent
0rbadvent / alis-install.sh
Created January 5, 2018 01:06
Arch Linux Install Script
# loadkeys es
# wget -O alis.conf https://raw.githubusercontent.com/picodotdev/alis/master/alis.conf
# nano alis.conf
# wget -O alis.sh https://raw.githubusercontent.com/picodotdev/alis/master/alis.sh
# chmod +x alis.sh
# ./alis.sh
@0rbadvent
0rbadvent / GigabyteUSB3Fix.md
Created January 5, 2018 01:09 — forked from 2E0PGS/gigabyte-usb3-fix.md
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"

@0rbadvent
0rbadvent / xorg.conf
Created January 5, 2018 01:21 — forked from xenithorb/xorg.conf
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
@0rbadvent
0rbadvent / sysctl.conf
Created January 21, 2018 15:55 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
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"
@0rbadvent
0rbadvent / lotterynumbers.rs
Created January 27, 2018 20:04
my first rust code :)
extern crate rand;
use rand::Rng;
fn main() {
for i in 0..20 {
println!("[{}.] {}", i + 1, output());
}
}
fn get_lotterynumbers() -> Vec<i32> {