Skip to content

Instantly share code, notes, and snippets.

View dunkelstern's full-sized avatar
🐢

Johannes Schriewer dunkelstern

🐢
View GitHub Profile
@FiXato
FiXato / Mastodon-indicate_undescribed_media_with_borders-subtler.user.css
Last active March 7, 2024 18:29
CSS user style to add a red border around media (images, audio, video and animated 'gifv') that lacks a description. Based on code by Paul: https://linernotes.club/@balrogboogie
/* indicate media without a description
initial code by Paul (https://linernotes.club/@balrogboogie), expanded upon by FiXato (https://contact.fixato.org)
related discussions: https://dragonscave.space/@Mayana/106443499687608116.
Feel free to reuse it; it's public domain (https://linernotes.club/@balrogboogie/106681622019395866) */
.media-gallery__item-thumbnail img:not([alt]),
.audio-player__canvas:not([title]),
.video-player video:not([title]),
.media-gallery__gifv video:not([title])
{
border: 1px dashed rgba(255, 0, 0, 0.5);
@justinschuldt
justinschuldt / raspberry-pi-zero_as_webcam.md
Last active February 25, 2024 07:34
Directions for setting up a RaspberryPi to act as a generic USB webcam

hardware/software

Webcam parts:

  • Raspberry Pi Zero W Rev 1.1
  • Raspberry Pi Camera v2 (8-megapixel)
  • Raspberry Pi High Quality Camera (12.3-megapixel)
  • Raspbian Buster Lite 2020-02-13

Webcam works with:

  • Windows 10
  • Windows 10 "Camera" app
@Informatic
Informatic / domain.xml
Last active April 7, 2024 23:20
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@codingjoe
codingjoe / django_docs.md
Last active July 24, 2022 23:16
Build Django docs like a pro!

Build Django docs like a pro!

Sphinx config

docs/conf.py

import importlib
import inspect
import os
import sys
@felix-schwarz
felix-schwarz / ISRunLoopThread.h
Last active July 6, 2018 01:23
This class makes it easy to spawn background threads, use their runloop and submit blocks to it from anywhere. Developed for scheduling NSStreams in the background. Keep in mind runloops aren't thread-safe, so when you use a thread's runloop, be sure to wrap that part of your code inside a block and pass it to -[ISRunLoopThread dispatchBlockToRu…
//
// ISRunLoopThread.h
//
// Created by Felix Schwarz on 13.09.14.
// Copyright (c) 2014 IOSPIRIT GmbH. All rights reserved.
//
/*
#
# Copyright (c) 2014 Felix Schwarz (@felix_schwarz), IOSPIRIT GmbH (@iospirit)
@steipete
steipete / PSPDFViewController.h
Last active June 6, 2017 03:56
This method will help to prevent a lot of emails about "weird bugs".
// Defines a yet undocumented method to add a warning if super isn't called.
#ifndef NS_REQUIRES_SUPER
#if __has_attribute(objc_requires_super)
#define NS_REQUIRES_SUPER __attribute((objc_requires_super))
#else
#define NS_REQUIRES_SUPER
#endif
#endif
@interface UIViewController (SubclassingWarnings)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <glib.h>
#define GST_USE_UNSTABLE_API
#include <gst/gst.h>
#include <gst/rtsp-server/rtsp-server.h>
@d0k
d0k / gist:3608547
Last active February 21, 2022 23:34
clang warning flags
-W
-Wextra
-Wmissing-field-initializers
-Wignored-qualifiers
-Winitializer-overrides
-Wsemicolon-before-method-body
-Wmissing-method-return-type
-Wsign-compare
-Wunused-parameter
-W#pragma-messages