Skip to content

Instantly share code, notes, and snippets.

View mrunkel's full-sized avatar

Marc Runkel mrunkel

  • plusForta, GmbH
  • Düsseldorf, Germany
View GitHub Profile
@mrunkel
mrunkel / certbot.sh
Last active April 25, 2019 08:16
Ubuntu install certbot
# Install certbot
apt update && apt install software-properties-common && add-apt-repository universe && add-apt-repository ppa:certbot/certbot -y && apt update && apt upgrade -y && apt install -y certbot python-certbot-nginx
# Request cert
certbot --nginx
# Request cert via DNS
# Set up ~/.aws/config first
certbot -a dns-route53 -i nginx -d "oa-prod.pfdev.de" -d "secure.kautionsfrei.de" -d "secure.kautionsfuchs.de" --server https://acme-v02.api.letsencrypt.org/directory
@mrunkel
mrunkel / AcceptanceTester.php
Created December 10, 2018 12:33
PHP method to take full screenshots in codeception
<?php
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
@mrunkel
mrunkel / pdns2route53.php
Created September 13, 2018 07:19
Reads a powerDNS mysql database and generates commands to load the data into route53 via cli53
#!/usr/bin/php
<?php
/**
* Reads a powerDNS mysql database and generates commands to load the data into route53 via cli53
* User: mrunkel
* Date: 3/25/14
* Time: 2:50 PM
*/
$shortOptions = "u::"; //optional mysql username
@mrunkel
mrunkel / kirby-nginx-redirect.conf
Created September 3, 2018 08:52
Simple HTTP to HTTPS redirect for nginx
server {
listen *:80;
server_name <SERVERNAME HERE>;
root /var/www/frontend-core/current;
index index.html index.htm index.php;
access_log /var/log/nginx/redirect-<SERVERNAME HERE>-access.log combined;
error_log /var/log/nginx/redirect-<SERVERNAME HERE>-error.log error;
rewrite ^ https://$server_name$request_uri? permanent;
@mrunkel
mrunkel / kirby-nginx.conf
Created September 3, 2018 08:49
A fully working kirby nginx conf file
server {
listen *:443 ssl http2 default_server;
server_name <SERVERNAME HERE>;
ssl on;
# see https://letsencrypt.org/ for an SSL cert
ssl_certificate /etc/letsencrypt/certs/<SERVERNAME HERE>_fullchain.pem;
ssl_certificate_key /etc/letsencrypt/private/<SERVERNAME HERE>.key;
@mrunkel
mrunkel / bullshit.html
Last active January 29, 2022 06:58
Almost 4,000 lines of javascript and HTML presented when pressing "I DO NOT ACCEPT" at westernjournal.com
<html lang="en-US" prefix="og: http://ogp.me/ns#">
<head>
<script type="text/javascript"
src="https://bam.nr-data.net/1/122dc12de0?a=17724322,86577151&amp;v=1071.385e752&amp;to=YQFSN0RZDxZUUEBaClhLcQBCUQ4LGkNVVAA%3D&amp;rst=1161&amp;ref=https://www.westernjournal.com/consent/&amp;ap=207&amp;be=141&amp;fe=1148&amp;dc=402&amp;af=err,xhr,stn,ins&amp;perf=%7B%22timing%22:%7B%22of%22:1531994499391,%22n%22:0,%22u%22:82,%22r%22:7,%22ue%22:85,%22re%22:39,%22f%22:39,%22dn%22:39,%22dne%22:39,%22c%22:39,%22ce%22:39,%22rq%22:41,%22rp%22:72,%22rpe%22:86,%22dl%22:101,%22di%22:401,%22ds%22:402,%22de%22:402,%22dc%22:1148,%22l%22:1148,%22le%22:1158%7D,%22navigation%22:%7B%22rc%22:1%7D%7D&amp;at=TUZRQQxDHBg%3D&amp;jsonp=NREUM.setToken"></script>
<script src="https://js-agent.newrelic.com/nr-1071.min.js"></script>
<script type="text/javascript" id="www-widgetapi-script"
src="https://s.ytimg.com/yts/jsbin/www-widgetapi-vflLq-1W7/www-widgetapi.js" async=""></script>
<script src="https://sec

Create a file in /game called options.rpy with the following content

init -1:
  python hide:
    config.developer = True

In /Renpy/Common/00console.rpy

Set config.console variable to True (use capital T)

@mrunkel
mrunkel / nginx_location.txt
Created March 20, 2018 14:54
nginx location matching rules explained
# READ (AND UNDERSTAND) THIS BEFORE MODIFYING THE location settings
# location optional_modifier location_match {
# ....
# }
#
# The location_match in the above defines what Nginx should check the request URI against. The existence or
# nonexistence of the optional_modifier in the above example affects the way that the Nginx attempts to match the
# location block. The modifiers below will cause the associated location block to be interpreted as follows:
#
@mrunkel
mrunkel / reboot.sh
Created March 15, 2018 13:40
Commands to force a reboot of a linux server
# don't do this except in cases of last resort!
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger