Skip to content

Instantly share code, notes, and snippets.

View ArseniyShestakov's full-sized avatar

Arseniy Shestakov ArseniyShestakov

View GitHub Profile
@ArseniyShestakov
ArseniyShestakov / README
Created December 28, 2014 17:51
SteamCMD script to install PA headless
You need to do this:
1 - Download SteamCMD for Windows:
http://media.steampowered.com/installer/steamcmd.zip
2 - Extract it.
Now in directory with SteamCMD save script.cmd
3 - Now run it from console this way:
steamcmd +runscript script.cmd
More details about SteamCMD available here:
@ArseniyShestakov
ArseniyShestakov / list.txt
Last active August 29, 2015 14:16
Intel OTC developers
For this comment on reddit:
http://www.reddit.com/r/linux_gaming/comments/2xd0sr/eli5_why_is_the_performance_of_open_source_video/
Intel OTC Mesa:
http://cgit.freedesktop.org/mesa/mesa/log/?qt=grep&q=intel.com
abdiel.janulgue@linux.intel.com
benjamin.widawsky@intel.com
chad.versace@intel.com
connor.abbott@intel.com
damien.lespiau@intel.com
@ArseniyShestakov
ArseniyShestakov / pre.sh
Created March 15, 2015 06:17
QEMU configuration
#!/bin/sh
modprobe vfio-pci
service lightdm stop
echo "1002 6719" > /sys/bus/pci/drivers/vfio-pci/new_id
echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind
echo "0000:01:00.0" > /sys/bus/pci/drivers/vfio-pci/bind
echo "1002 6719" > /sys/bus/pci/drivers/vfio-pci/remove_id
echo "1002 aa80" > /sys/bus/pci/drivers/vfio-pci/new_id
@ArseniyShestakov
ArseniyShestakov / ig7icd32.dll.txt
Last active August 29, 2015 14:18
Android IA: proprietary EGL UFO strings
!This program cannot be run in DOS mode.
VMRich
.text
`.rdata
@.data
.tls
.rsrc
@.reloc
h bE
h0bE
@ArseniyShestakov
ArseniyShestakov / colors.py
Created May 12, 2015 21:43
Simple Python script for monitor testing: show one color fullscreen
# Based off snippet:
# http://unix.stackexchange.com/questions/195910/start-a-single-color-full-screen-from-the-terminal
import gtk
import sys
from itertools import cycle
def color(widget, event):
colors = ['#FFFFFF', '#000000', '#FF0000', '#0000FF', '#008000', '#FFFF00']
color.idx = (color.idx + 1) % len(colors)
w.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(colors[color.idx]))
@ArseniyShestakov
ArseniyShestakov / images.py
Created June 29, 2015 22:06
Simple Python script for monitor testing: show images fullscreen
#!/usr/bin/env python
# https://gist.github.com/ArseniyShestakov/969f27d4a2437fe60cd1
import os, sys, gtk, argparse
from os import path
from itertools import cycle
# Check command line options
parser = argparse.ArgumentParser(description='Simple fullscreen image view')
parser.add_argument('imagedir', nargs='?', default=path.join(os.getcwd(), "img"), help="directory with background images")
parser.add_argument('-a', '--noauto', action="store_false", help="disable auto rotation")
@ArseniyShestakov
ArseniyShestakov / console_tricks
Last active August 29, 2015 14:24
Different console tricks to remember
# Lazy TCP port forwarding on localhost
autossh -M 0 -f -N -R 34567:192.168.1.150:34567 localhost
## Proper port forwarding from server to internal subnet
# Allow forwarding on external interface (eth0)
iptables -A FORWARD --in-interface eth0 -j ACCEPT
# Add masquerade for internal OpenVPN interface (tun0)
iptables -t nat -A POSTROUTING --out-interface tun0 -j MASQUERADE
# Forward from public ip port 8080 to internal port 80
iptables -t nat -A PREROUTING -p tcp -i eth0 -m tcp --dport 8080 -j DNAT --to-destination 192.168.1.150:80
@ArseniyShestakov
ArseniyShestakov / randomfiles.go
Created September 2, 2015 19:25
Simple tool to copy N files into different direcoty
package main
import (
"path"
"path/filepath"
"os"
"time"
"strconv"
"math/rand"
)
diff -rupN linux-3.15.old/Documentation/kernel-parameters.txt linux-3.15/Documentation/kernel-parameters.txt
--- linux-3.15.old/Documentation/kernel-parameters.txt 2014-06-08 15:19:54.000000000 -0300
+++ linux-3.15/Documentation/kernel-parameters.txt 2014-06-09 18:05:31.744055580 -0300
@@ -2554,6 +2554,16 @@ bytes respectively. Such letter suffixes
nomsi Do not use MSI for native PCIe PME signaling (this makes
all PCIe root ports use INTx for all services).
+ pcie_acs_override =
+ [PCIE] Override missing PCIe ACS support for:
+ downstream
@ArseniyShestakov
ArseniyShestakov / include_qemu_name_in_pulseaudio_client_name.patch
Created September 20, 2015 09:55
QEMU patch that make audio control easier when you run multiple VMs
diff --git a/audio/paaudio.c b/audio/paaudio.c
index fea6071..5a8a4b9 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -1,6 +1,7 @@
/* public domain */
#include "qemu-common.h"
#include "audio.h"
+#include "sysemu/sysemu.h"