Skip to content

Instantly share code, notes, and snippets.

View irgendwr's full-sized avatar

Jonas Bögle irgendwr

View GitHub Profile
@irgendwr
irgendwr / mandelbrot.pl
Last active February 12, 2020 16:46
Visual representation of the Mandelbrot set in SWI Prolog.
% Jonas Boegle - https://github.com/irgendwr
:- use_module(library(pce)).
% draw(+Width, +Height, +Xoffset, +Yoffset, +Scale)
% Draws a mandelbrot set with a given size, x-/y-offset and Scale factor.
draw(Width, Height, Xoffset, Yoffset, Scale) :-
% create a new display and open it
new(Display, window('mhh, lecker Mandelbrot - Jonas @irgendwr :)')),
send(Display, size, size(Width, Height)),
@irgendwr
irgendwr / removePVESubPopup.sh
Last active March 2, 2021 17:43
Removes the 'No valid Subscription' warning in the PVE webinterface.
#!/bin/bash
# Description:
# removes the 'No valid Subscription' warning in the webinterface
sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/js/pvemanagerlib.js
sed -i.bak "s/data.status === 'Active'/true/g" /usr/share/pve-manager/js/pvemanagerlib.js
sed -i.bak "s/data.status !== 'Active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
sed -i.bak "s/data.status.toLowerCase() !== 'active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
@irgendwr
irgendwr / .gitlab-ci.yml
Last active April 6, 2019 22:29
GitLab CI file for deploying a hugo page
image: jguyomard/hugo-builder:latest
stages:
- test
- deploy
test:
stage: test
script:
- hugo
@irgendwr
irgendwr / phpmyadmin.conf
Created March 25, 2019 16:00
Nginx snippet for serving phpmyadmin in a custom subdirectory
location /pma {
alias /usr/share/phpmyadmin;
try_files $uri $uri/ @pma =404;
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; # <-- change this to fit your installation
}
}
@irgendwr
irgendwr / custom_error_pages.conf
Last active April 15, 2020 22:49
Nginx snippet for custom error pages that searches the root first and falls back to a default location.
error_page 400 /400.html;
error_page 401 /401.html;
error_page 403 /403.html;
error_page 404 /404.html;
error_page 500 /500.html;
error_page 501 /501.html;
error_page 502 /502.html;
error_page 503 /503.html;
error_page 520 /520.html;
error_page 521 /521.html;
@irgendwr
irgendwr / .bashrc
Last active January 28, 2022 20:35
bashrc config for bash
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace