Skip to content

Instantly share code, notes, and snippets.

@porst17
porst17 / complex-trado-webgl.html
Created June 1, 2023 06:35
Complex Transformation WebGL Demo
<!DOCTYPE html>
<html>
<head> </head>
<body>
<canvas id="backward" width="640" height="480"></canvas><br />
<video id="input" width="640" height="480"></video><br />
<canvas id="forward" width="640" height="480"></canvas><br />
<script>
const importShaderCodeLibrary = `
vec2 cAdd(in vec2 a, in vec2 b) {
@porst17
porst17 / index.html
Last active February 4, 2022 13:37
Electron's webContents.insertCSS seems to ignore the origin parameter
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@porst17
porst17 / rc.xml
Created September 9, 2020 09:16
Openbox configuration supporting PulseAudio volume control via keyboard volumes keys (up/down/mute)
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
<resistance>
<strength>10</strength>
<screen_edge_strength>20</screen_edge_strength>
</resistance>
<focus>
<focusNew>yes</focusNew>
@porst17
porst17 / .gitignore
Last active September 14, 2020 07:54
German IMAGINATION poetry corpus
node_modules
@porst17
porst17 / Webstorm-Airbnb-Javascript-codeStyle.xml
Last active April 7, 2021 13:04 — forked from mentos1386/Webstorm-Airbnb-Javascript-codeStyle.xml
Airbnb inspired Webstorm Javascript CodeStyle
<code_scheme name="Airbnb" version="173">
<option name="RIGHT_MARGIN" value="100" />
<HTMLCodeStyleSettings>
<option name="HTML_ENFORCE_QUOTES" value="true" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
<option name="USE_CHAINED_CALLS_GROUP_INDENTS" value="true" />
@porst17
porst17 / latency-check.html
Created October 12, 2018 13:25
WebAudio tests
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>WebAudio Latency Checker</title>
<meta name="description" content="Connects user input directly with WebAudio output in order to check for the minimal achievable latency">
<meta name="author" content="Christian Stussak">
@porst17
porst17 / automirror
Last active February 21, 2017 08:48
Automatically mirror main display to other connected displays
#!/bin/bash
if [ "$#" -lt 2 ]; then
if [ "$#" -eq 1 ]; then
DISPLAYS=`xrandr | grep " connected" | sed "s/ .*$//" | grep -v "$1"`
DISPLAYS="$1 $DISPLAYS"
else
DISPLAYS=`xrandr | grep " connected" | sed "s/ .*$//"`
fi
ARR_DISPLAYS=( $DISPLAYS )
@porst17
porst17 / op2erp.cpp
Last active July 29, 2016 07:56
Combine 4 orthographic renderings of a sphere into a equirectangular map of the sphere
/*
* Copyright 2016 Christian Stussak
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@porst17
porst17 / useful-docker-commands.md
Last active March 8, 2016 15:08
Some docker commands, I would like to remember

Use the current user and his group(s) inside the container:

docker run
  -ti
  --rm
  -u `id -u`
  -v /etc/group:/etc/group
  -v /etc/passwd:/etc/passwd
  alpine
 /bin/sh
@porst17
porst17 / hb_client.html
Last active August 30, 2016 10:53 — forked from malex984/heartbeat2.py
Heartbeat server / client and libraries
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<h2>Open your JavaScript console!</h2>
<div>