Skip to content

Instantly share code, notes, and snippets.

getEmoji("fedi.fun");
function loadJSON(url, callback) {
var xhr = new XMLHttpRequest();
xhr.overrideMimeType("application/json");
xhr.open("GET", url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
callback(xhr.responseText);
}
@GamePlayer-8
GamePlayer-8 / Steam Dockerfile
Last active June 26, 2023 17:14
Steam Docker Container
FROM ubuntu
USER root
ENV DISPLAY="192.168.50.1:0.0"
ENV PULSE_SERVER="192.168.50.1"
ENV TZ=Europe/Warsaw
ENV HOME /home/steam
RUN dpkg --add-architecture i386
@GamePlayer-8
GamePlayer-8 / Steam Shell Runner
Created June 26, 2023 17:21
Steam Docker runner
#!/bin/sh
docker run --cap-add=SYS_NICE --network=steam --rm -it -v /home/steam:/home/steam --device /dev/dri --userns=keep-id --ip 192.168.50.10 ubuntu/steam $*
@GamePlayer-8
GamePlayer-8 / luacodeq.lua
Created June 27, 2023 12:17
Abandoned Lua-made bison + flex builtin compiler for CodeQ syntax
--[[
Developed by @GamePlayer-8
on
AERO KIANIT LICENSE 1.0
]]--
--[[ Abanboned - Replaced by C version ]]--
function file_exists(name)
local f=io.open(name,"r")
@GamePlayer-8
GamePlayer-8 / example.cq
Created June 27, 2023 12:18
Example CodeQ script
# Comment
!catch core
VARIABLE = [ test test2 ]
RAM_VARIABLE = VARIABLE[0]
SWAP_VARIABLE = []
@GamePlayer-8
GamePlayer-8 / example.c2q
Last active June 27, 2023 13:01
CodeToQuery example script.
;Comment
;/
Long comment
/;
catch['assembly'] ;base library load
set[x]=calc[1 + 1].set[y]=calc[get[x] - 5]
@GamePlayer-8
GamePlayer-8 / nginx_motion.conf
Created July 19, 2023 07:25
nginx_motion.conf
set $motionweb <MOTION WEBPORT>;
set $motionstream <MOTION STREAMPORT>;
set $motionip <MOTION IP>;
location /motion/ {
add_header Access-Control-Allow-Origin *;
proxy_pass http://$motionip:$motionweb/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
@GamePlayer-8
GamePlayer-8 / nginx_pihole.conf
Created July 19, 2023 07:27
nginx_pihole.conf
set $piholeip <PIHOLE IP>;
set $piholeport <PIHOLE PORT>;
location /pihole/ {
proxy_redirect /admin/ /pihole/;
proxy_pass http://$piholeip:$piholeport/admin/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 90;
@GamePlayer-8
GamePlayer-8 / nginx_cups.conf
Created July 19, 2023 07:30
nginx_cups.conf
set $cupsip <CUPS IP>;
set $cupsport <CUPS PORT>;
location /cups/ {
add_header Access-Control-Allow-Origin *;
proxy_pass http://$cupsip:$cupsport/;
proxy_set_header Accept-Encoding "";
proxy_pass_request_headers on;
proxy_redirect / /cups/;
sub_filter 'http://' 'https://';
@GamePlayer-8
GamePlayer-8 / nginx_gotty.conf
Created July 19, 2023 07:33
nginx_gotty.conf
set $gottyip <GoTTY IP>;
set $gottyport <GoTTY PORT>;
location /tty/ {
proxy_pass https://$gottyip:$gottyport/;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Accept-Encoding "";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;