Skip to content

Instantly share code, notes, and snippets.

View hradec's full-sized avatar

Hradec hradec

View GitHub Profile
@hradec
hradec / cleanupUPNP.sh
Created July 30, 2020 20:37
A simple script to cleanup duplicated entries in a UPNP Server using upnpc!
#!/bin/bash
# to speed up the execution by not having to probe the network for the upnp server
# or if you have more than one upnp server in your network,
# use upnp_url var to specify the url of your upnp server.
# to find all the upnp servers urls, you can run:
# upnpc -l | grep 'InternetGatewayDevice' -B 1 | grep 'desc:'
#upnp_url="http://192.168.10.1:6352/rootDesc.xml"
@hradec
hradec / ue4-docker
Last active May 16, 2020 22:38
run ue4-docker without installing anything!
#!/bin/bash
if [ ! -e env/bin/ue4-docker ] ; then
python3 -m venv env
source env/bin/activate
pip3 install ue4-docker
deactivate
#!/usr/bin/python
import struct, socket, sys
# network block device server, substitute for nbd-server. Probably slower.
# But it works! And it's probably a lot easier to improve the
# performance of this Python version than of the C version. This
# Python version is 14% of the size and perhaps 20% of the features of
# the C version. Hmm, that's not so great after all...
# Working:
# - nbd protocol
# - read/write serving up files
@hradec
hradec / sshuttle.service
Last active July 11, 2019 17:44 — forked from theherk/sshuttle.service
systemd service unit file for sshuttle
[Unit]
Description=sshuttle service a permanent tunnel
After=network.target
[Service]
ExecStart=/usr/bin/sshuttle -r <user@address:port> --no-latency-control --disable-ipv6 -H --dns -v 192.168.0.0/24
Restart=always
[Install]
WantedBy=multi-user.target
@hradec
hradec / gist:ea975f6583dcd661dc2a198d759550fe
Created December 5, 2017 06:28
/tmp/dumps/crash_20171204222213_1.dmp
Sending build context to Docker daemon 6.144kB
Step 1/10 : FROM walberla/buildenv-ubuntu-basic:16.04
---> 6538453ed055
Step 2/10 : MAINTAINER hradec <hradec@hradec.com>
---> Using cache
---> f05f121ecfaf
Step 3/10 : ARG GCC_VERSION=4.9
---> Using cache
---> e410591d124c
Step 4/10 : RUN apt-get update
@hradec
hradec / gist:3bde3df30e3099a9f401b151edb2f5bc
Created November 29, 2017 03:47
VK_LOADER_DEBUG=all ~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $ VK_LOADER_DEBUG=all ~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
+++ dirname /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
++ cd /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/..
@hradec
hradec / gist:8ad16fc4ae1c362ff8167f6a40fda3f8
Created November 29, 2017 03:47
VK_LOADER_DEBUG=all ~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $ VK_LOADER_DEBUG=all ~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh ~/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
+++ dirname /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
++ cd /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/..
@hradec
hradec / gist:f00d281953b221ca65f523aefb954080
Created November 29, 2017 03:39
~/.local/share/Steam/ubuntu12_32/steam-runtime/run.sh vulkaninfo
===========
VULKAN INFO
===========
Vulkan API Version: 1.0.61
INFO: [loader] Code 0 : Found manifest file /usr/share/vulkan/explicit_layer.d/VkLayer_core_validation.json, version "1.1.0"
INFO: [loader] Code 0 : Found manifest file /usr/share/vulkan/explicit_layer.d/VkLayer_unique_objects.json, version "1.1.0"
INFO: [loader] Code 0 : Found manifest file /usr/share/vulkan/explicit_layer.d/VkLayer_standard_validation.json, version "1.1.1"
INFO: [loader] Code 0 : Encountered meta-layer VK_LAYER_LUNARG_standard_validation
@hradec
hradec / gist:da94ec5af2c8f3448d582044741f154c
Created November 28, 2017 23:28
running steamvr with VK_LOADER_DEBUG=all
rhradec@server.local ~/.local/share/Steam/steamapps/common/SteamVR $ VK_LOADER_DEBUG=all /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
+++ dirname /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
++ cd /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/..
++ pwd
+ TOOLSDIR=/atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR
++ cd /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/../runtime
/atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh: line 3: cd: /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/../runtime: No such file or directory
++ pwd
+ RUNTIMEDIR=/atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR
+ case $(uname) in
@hradec
hradec / gist:3231150dc2f2c9de5b81032e188c1a32
Created November 27, 2017 22:46
~/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
+++ dirname /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh
++ cd /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/..
++ pwd
+ TOOLSDIR=/atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR
++ cd /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/../runtime
/atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/bin/vrstartup.sh: line 3: cd: /atomo/home/rhradec/.local/share/Steam/steamapps/common/SteamVR/../runtime: No such file or directory
++ pwd
+ RUNTIMEDIR=/RAID/atomo/home/rhradec
+ case $(uname) in
++ uname