Skip to content

Instantly share code, notes, and snippets.

@zocker-160
zocker-160 / flatpak-export-command.py
Created July 4, 2022 16:26
python script to export flatpak application commands to a simple command in $PATH
#!/usr/bin/env python3
# Python >= 3.5 required.
"""
Author: Jiří Janoušek <janousek.jiri@gmail.com>
To the extent possible under law, author has waived all
copyright and related or neighboring rights to this file.
http://creativecommons.org/publicdomain/zero/1.0/
@zocker-160
zocker-160 / python3-pyqt5.yml
Created April 1, 2022 01:25
Flatpak manifest for PyQt5
name: PyQt5
cleanup:
- "/include"
- "/lib/python3.8/site-packages/*.pyi"
- "/lib/python3.8/site-packages/PyQt5/uic"
config-opts:
- "--disable-static"
- "--enable-x11"
buildsystem: simple
build-commands:
@zocker-160
zocker-160 / centering.py
Last active April 11, 2022 20:32 — forked from saleph/centering.py
[qt5] center a window on screen
__author__ = 'tom'
import sys
from PyQt5.QtWidgets import QWidget, QApplication
class Example(QWidget):
def __init__(self, app: QApplication):
super().__init__()
self.app = app
@zocker-160
zocker-160 / MakeResolutionSelectable.reg
Created February 11, 2021 19:07
regedit file to enable widescreen resolutions for Settlers: Heritage of Kings
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Blue Byte\The Settlers - Heritage of Kings\Development]
"DefaultResolution"="select"
[HKEY_LOCAL_MACHINE\SOFTWARE\Blue Byte\The Settlers - Heritage of Kings\Development]
"DefaultResolution"="select"
@zocker-160
zocker-160 / screenshot.py
Created December 21, 2020 14:41 — forked from frakman1/screenshot.py
screenshot utility
#!/usr/bin/env python
# Python screenshot tool (fullscreen/area selection)
# Ported from https://gist.github.com/initbrain/6628609
# Tested on Windows 7 64bit using PyQt5 and python 3.7
# area selection NOT working
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from subprocess import getoutput
@zocker-160
zocker-160 / screenshot.py
Created December 21, 2020 14:41 — forked from initbrain/screenshot.py
Python screenshot tool (fullscreen/area selection)
#!/usr/bin/env python
# Python screenshot tool (fullscreen/area selection)
# Tested on:
# Lubuntu 13.04 x86_64
# Gentoo 4.1.7-hardened-r1 x86_64
import sys
from PyQt4 import QtCore, QtGui
from commands import getoutput
from StringIO import StringIO
@zocker-160
zocker-160 / flappy.html
Created November 30, 2020 11:57 — forked from gullyn/flappy.html
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@zocker-160
zocker-160 / blender_cr_headless.md
Last active June 6, 2023 02:43
Setup a blender rendernode on a headless server with crowdrender addon

GUIDE: How To create a headless blender renderserver with CrowdRender addon

Requirements

  • any headless Linux server
  • Blender v2.79 or v2.80 - v2.93 (from package manager or blender.org)
  • latest version of CrowdRender addon
  • optional: GPU drivers for GPU-rendering

install and activate addon