Skip to content

Instantly share code, notes, and snippets.

View jogu's full-sized avatar

Joseph Heenan jogu

View GitHub Profile
@jogu
jogu / gist:708792a63754efc724015c6598b855e4
Created December 18, 2020 13:02
git gui crash on Big Sur
Process: Wish [11631]
Path: /usr/local/git/share/git-gui/lib/Git Gui.app/Contents/MacOS/Wish
Identifier: cz.or.repo.git-gui
Version: 0.21.GITGUI-dirty (0.21.GITGUI-dirty)
Code Type: X86-64 (Native)
Parent Process: ??? [11630]
Responsible: iTerm2 [7713]
User ID: 501
Date/Time: 2020-12-18 12:54:02.800 +0000
@jogu
jogu / apache.conf
Last active April 28, 2023 09:35
apache + letsencrypt + TLS-ALPN-01 with mod_md - avoids opening port 80
ServerName foo.com
Protocols http/1.1 acme-tls/1
MDCAChallenges tls-alpn-01
MDCertificateAgreement accepted
MDomain foo.com
MDPrivateKeys RSA 4096
<VirtualHost _default_:443>
ServerAdmin [email protected]
joseph@button:~$ python3
Python 3.4.2 (default, Sep 16 2019, 12:55:35)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> import sys
>>>
>>> class TimestampFilter:
... # pending_output stores any output passed to write where a \n has not yet been found
... pending_output = ''

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@jogu
jogu / gist:e880e3a78a54c0d449beee5f8d2c5acd
Created March 27, 2019 11:21
openid connect hash calculation
Josephs-MacBook-Pro-2086:bin joseph$ cat calculate-hash.py
#!/usr/bin/python -u
import hashlib
import sys
import base64
hash = hashlib.sha256()
hash.update(sys.argv[1])
digest = hash.digest() # this returns the hash digest bytes (not a hex string)
1.195667 --> URL: https://op.authlete.com/api/authorization?scope=openid&state=9UUUOhmfuyXlzvBX&redirect_uri=https%3A%2F%2Fop.certification.openid.net%3A61070%2Fauthz_cb&response_type=code+id_token&client_id=3895104067335
1.195675 --> BODY: None
1.945443 QUERY_STRING:
2.306428 <-- error=invalid_request&error_description=%5BA014303%5D+%27nonce%27+is+required+when+%27response_type%27+contains+%27id_token%27.&error_uri=https%3A%2F%2Fwww.authlete.com%2Fdocuments%2Fapis%2Fresult_codes%23A014303&state=9UUUOhmfuyXlzvBX
2.308112 AuthorizationErrorResponse: {
"error": "invalid_request",
"error_description": "[A014303] 'nonce' is required when 'response_type' contains 'id_token'.",
"error_uri": "https://www.authlete.com/documents/apis/result_codes#A014303",
"state": "9UUUOhmfuyXlzvBX"
}
[dan@GPRO mottest]$ motion
[24539520:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /usr/etc/motion/motion.conf
[24539520:motion] [NTC] [ALL] motion_startup: Motion 4.0.1+gita0b4161 Started
[24539520:motion] [NTC] [ALL] motion_startup: Logging to syslog
[24539520:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (NTC)
[24539520:motion] [NTC] [ENC] ffmpeg_global_init: ffmpeg libavcodec version 57.89.100 libavformat version 57.71.100
[0:motion] [NTC] [ALL] main: Camera 0 is from /usr/etc/motion/motion.conf
[0:motion] [NTC] [ALL] main: Camera 0 is device: v4l2:///dev/video1 input -1
[0:motion] [NTC] [ALL] main: Stream port 8081
[0:motion] [NTC] [ALL] main: Waiting for threads to finish, pid: 7708
==5794== Thread 10 nc4:patio:
==5794== Invalid read of size 4
==5794== at 0x425660: netcam_interrupt_rtsp (netcam_rtsp.c:223)
==5794== by 0x62ACAD6: ??? (in /usr/lib/x86_64-linux-gnu/libavformat.so.57.41.100)
==5794== by 0x63A5CFF: ??? (in /usr/lib/x86_64-linux-gnu/libavformat.so.57.41.100)
==5794== by 0x63A1073: ??? (in /usr/lib/x86_64-linux-gnu/libavformat.so.57.41.100)
==5794== by 0x63A3717: ??? (in /usr/lib/x86_64-linux-gnu/libavformat.so.57.41.100)
==5794== by 0x63CC472: ??? (in /usr/lib/x86_64-linux-gnu/libavformat.so.57.41.100)
==5794== by 0x63CD2BD: ??? (in /usr/lib/x86_64-linux-gnu/libavformat.so.57.41.100)
==5794== by 0x63CF2FC: avformat_find_stream_info (in /usr/lib/x86_64-linux-gnu/libavformat.so.57.41.100)
$ ffmpeg
ffmpeg version 3.1.3-1~bpo8+1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --prefix=/usr --extra-version='1~bpo8+1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --disable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx