Skip to content

Instantly share code, notes, and snippets.

Avatar

Leszek Cimała ernierasta

  • zori.[cz|pl|sk]
  • Czech Republic
View GitHub Profile
@ernierasta
ernierasta / libvirt-win10.xml
Created Nov 24, 2020
libvirt Windows 10 optimal settings, no microphone cracking
View libvirt-win10.xml
<!-- IMPORTANT: before you try this, change in system:
/etc/pulse/daemon.conf:
default-sample-rate = 44100
alternate-sample-rate = 48000
/etc/libvirt/qemu.conf:
user = "ernie"
Then restart pulseaudio & libvirt or reboot.
View inet-postrouting.nft
table inet nat {
chain postrouting {
type nat hook postrouting priority 0; policy accept;
masquerade
}
}
View inet-filter.nft
table inet filter {
chain input {
type filter hook input priority 0;
iifname $LXC_BR accept \
comment "Accept any LXC (bridge interface) traffic"
# common services on host
tcp dport { 22, 443 } accept;
}
View iptables
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Adjusted: 2019 Leszek Cimała
# It is best to use Jakubs template, this is for my needs.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@ernierasta
ernierasta / wlstream-strace.txt
Created Mar 15, 2019
strace of wlstream on Void Linux
View wlstream-strace.txt
execve("/usr/local/bin/wlstream", ["wlstream", "28", "vaapi", "/dev/dri/renderD128", "libx264", "nv12", "12", "output.mkv"], 0x7ffeebf64d48 /* 51 vars */) = 0
brk(NULL) = 0x72e000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/lib64/tls/x86_64/x86_64/libwayland-client.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib64/tls/x86_64/x86_64", 0x7ffcbe4888e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/lib64/tls/x86_64/libwayland-client.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib64/tls/x86_64", 0x7ffcbe4888e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/lib64/tls/x86_64/libwayland-client.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib64/tls/x86_64", 0x7ffcbe4888e0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/lib64/tls/libwayland-c
@ernierasta
ernierasta / sway-record
Last active Oct 29, 2020
Swaywm screen and audio recording
View sway-record
#!/bin/bash
# Sway WM screen + audio recorder
# original author: Aaron D. Fields
# blog post: https://blog.spirotot.com/2017/08/21/a-dirty-hack-to-enable-acceptable-sway-wm-screen-recording/
# currently error 503 :-(
#
# Updated version: ernierasta
# Repo: https://gist.github.com/ernierasta
#
# Changelog:
View Sulis_scripting_info_helpers.md

Sulis scripting helpers

https://github.com/Grokmoo/sulis

Shell oneliners to get usefull info about current engine scripting abilities.

Show currently implemented AI hooks:

grep -oP 'ai::FuncKind::\K\w+' sulis_state/src/entity_state.rs

@ernierasta
ernierasta / AI.lua
Created Aug 23, 2018
testing Sulis AI possibilities
View AI.lua
function find_closest_target(parent, targets)
closest_dist = 1000
closest_target = nil
for i = 1, #targets do
target = targets[i]
dist = parent:dist_to_entity(target)
if dist < closest_dist then
cl
@ernierasta
ernierasta / install-ubuntu-wxgo.txt
Last active Mar 3, 2017
Install wxgo on Ubuntu 16.10 64-bit
View install-ubuntu-wxgo.txt
# minimal ubuntu yakkety (16.10) netinstall (only additional ssh server)
#install golang (change 1.8 to actual latest version)
mkdir install && cd install
wget https://godeb.s3.amazonaws.com/godeb-amd64.tar.gz && tar xf godeb-amd64.tar.gz
./godeb install 1.8
#install dependencies
apt-get --no-install-recommends install git libwebkitgtk-3.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgl1-mesa-dev libglu1-mesa-dev libxxf86vm-dev libnotify-dev libjpeg-dev libtiff5-dev gcc g++
@ernierasta
ernierasta / install-debian-wxgo.txt
Last active Mar 3, 2017
Install wxgo on debian 8 64-bit
View install-debian-wxgo.txt
# minimal debian 8 64-bit install (only additional ssh server)
mkdir install && cd install
apt-get install -y ca-certificates
#install golang (change 1.8 to actual latest version)
wget https://godeb.s3.amazonaws.com/godeb-amd64.tar.gz && tar xf godeb-amd64.tar.gz
./godeb install 1.8
#install dependencies
apt-get --no-install-recommends install git libwebkitgtk-3.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgl1-mesa-dev libglu1-mesa-dev libxxf86vm-dev libnotify-dev libjpeg-dev libtiff5-dev
You can’t perform that action at this time.