Skip to content

Instantly share code, notes, and snippets.

View mritzmann's full-sized avatar

Markus Ritzmann mritzmann

View GitHub Profile

How to use $SSH_ASKPASS on macOS

SSH key forwarding is dangerous and a large attack vector.

Here’s what man ssh_config(5) has to say about ForwardAgent:

Agent forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host can access the local agent through the forwarded connection.

@mritzmann
mritzmann / attempt01.shell
Created July 10, 2019 08:16
download.nextcloud.com
$ php ~/www/occ app:update --all \
&& php ~/www/updater/updater.phar --no-interaction \
&& ~/www/occ upgrade \
&& php ~/www/occ app:update --all
Nextcloud Updater - version: v16.0.0beta3-4-gc7a4074
Current version is 16.0.2.
Update to Nextcloud 16.0.3 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-16.0.3.zip
@mritzmann
mritzmann / ys.zsh-theme
Created October 24, 2018 21:34
ys.zsh-theme edited for oh-my-zsh diskusage plugin
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# Mar 2013 Yad Smood
#
# // Edited for oh-my-zsh diskusage plugin
# VCS
@mritzmann
mritzmann / php-crud-api-393.patch
Created August 5, 2018 19:27
mevdschee/php-crud-api: Issue #393: dot in id
diff --git a/api.php b/api.php
index ee0769c..080f432 100644
--- a/api.php
+++ b/api.php
@@ -1887,7 +1887,7 @@ class PHP_CRUD_API {
extract($settings);
$table = $this->parseRequestParameter($request, 'a-zA-Z0-9\-_');
- $key = $this->parseRequestParameter($request, 'a-zA-Z0-9\-_,'); // auto-increment or uuid
+ $key = $this->parseRequestParameter($request, 'a-zA-Z0-9\-,\.'); // auto-increment or uuid
@mritzmann
mritzmann / after_update.sh
Created July 13, 2018 16:01
LG G6 with LineageOS: Boot Fix
#!/bin/sh
/sbin/dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
# After every OS Update, my LG G6 with LineageOS didn't boot.
# So i run this script with the Terminal inside "TWRP Recovery" to fix this Problem.
# sh /sdcard/scripts/after_update.sh

Would it be possible to include an iCal file attachment to the Access-A-Ride advance notification emails with a 30 minute window from the specified pickup time (that is the window in which Access-A-Ride drivers need to arrive)?

For example: if my Access-A-Ride is supposed to pick me up at 10:34 am from 1000 Broadway Ave and then again at 8:00 pm from 900 Jay St., include a calendar event (a .ics file) that would look similar to the following, attached to the advance trip notification:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
SUMMARY:Access-A-Ride Pickup
@mritzmann
mritzmann / remove_db_entry.php
Created November 4, 2017 00:39
remove netcup db entries
# more information:
# https://github.com/dnszensur/dnszensur-web/issues/47
<?php
include '.env';
$db = mysqli_connect("$db_host", "$db_user", "$db_password", "$db_name");
$result = mysqli_query($db, "SELECT domain, autonomous_system FROM domains WHERE autonomous_system LIKE 'AS197540 netcup GmbH'");
while($row = mysqli_fetch_object($result))
@mritzmann
mritzmann / export_env.sh
Created September 1, 2017 08:40
export .env
export $(cat .env | xargs)
DEBUG - os.symlink(/home/ocr/scan0_161129-144058.pdf, /tmp/com.github.ocrmypdf.1eo3vclv/origin)
DEBUG - os.symlink(/tmp/com.github.ocrmypdf.1eo3vclv/origin, /tmp/com.github.ocrmypdf.1eo3vclv/origin.pdf)
DEBUG - [{'width_inches': Decimal('8.05'), 'images': [{'enc': 'jpeg', 'type': 'image', 'comp': 3, 'name': '/Im0', 'width': 2416, 'height': 3461, 'dpi_h': Decimal('300.1734605377276920989970676600933074951171875'), 'dpi_w': Decimal('300.1242236024844487474183551967144012451171875'), 'color': 'rgb', 'dpi': Decimal('300.149'), 'bpc': 8}], 'height_pixels': 3461, 'xres': Decimal('300.1242236024844487474183551967144012451171875'), 'height_inches': Decimal('11.53'), 'has_text': False, 'yres': Decimal('300.1734605377276920989970676600933074951171875'), 'width_pixels': 2416, 'pageno': 0}, {'width_inches': Decimal('8.13'), 'images': [{'enc': 'jpeg', 'type': 'image', 'comp': 3, 'name': '/Im1', 'width': 2440, 'height': 3465, 'dpi_h': Decimal('300'), 'dpi_w': Decimal('300.123001230012278028880245983600616455078125'),
@mritzmann
mritzmann / gist:b315f349a3d28fda7cc3482540ae3038
Created August 21, 2016 19:45
Fritz!Box Internet Problems
18.07.16 20:16:44 IPv6-Präfix wurde erfolgreich bezogen. Neues Präfix: 2001:1620:c7d::/48
18.07.16 20:16:43 Internetverbindung IPv6 wurde erfolgreich hergestellt. IP-Adresse: 2001:1620:4:9d7d:2665:11ff:feef:c67
18.07.16 20:16:43 Internetverbindung wurde erfolgreich hergestellt. IP-Adresse: 213.144.157.125, DNS-Server: 77.109.128.3 und 213.144.129.21, Gateway: 213.144.128.206, Breitband-PoP: ipd-zhb790-r-bn-25
18.07.16 20:16:32 PPPoE-Fehler: Zeitüberschreitung.
18.07.16 20:16:25 DSL ist verfügbar (DSL-Synchronisierung besteht mit 55040/16488 kbit/s).
18.07.16 20:15:03 Zeitüberschreitung bei der PPP-Aushandlung.
18.07.16 20:15:02 Internetverbindung IPv6 wurde getrennt, Präfix nicht mehr gültig.
18.07.16 20:15:02 Internetverbindung wurde getrennt.
18.07.16 20:14:58 DSL antwortet nicht (Keine DSL-Synchronisierung).
18.07.16 20:12:26 IPv6-Präfix wurde erfolgreich bezogen. Neues Präfix: 2001:1620:c7d::/48