Skip to content

Instantly share code, notes, and snippets.

@kralo
kralo / a_rico_sp230sfnw_printer_scanner_linux.md
Created December 30, 2022 16:59
RICOH SP 230SFNw Printer/Scanner Linux

RICOH SP 230SFNw Printer/Scanner Linux

It's a dream come true! This machine works out of the box on ubuntu 22.10 !

printing works, scanning works!

cups printer

@kralo
kralo / export-csv-moodle.php
Created August 13, 2014 08:45
Example boilerplate for csv export from moodle
<?php
/**
* Example for howto to serve a csv file for download in Moodle using the /lib/csvlib.class.php
* Very handy for exporting various data. This example demonstrates csv data export from within a moodle plugin
*
* This file is public domain where applicable,
* else GNU LGPL
*/
require_once '../../config.php'; // to include $CFG, for example
require_once ($CFG->libdir . '/csvlib.class.php');
@kralo
kralo / a_TetraControl_Live_Web_Callmonitor.md
Created May 11, 2022 07:18
Live Callmonitor for Tetracontrol - Tetra Funkgespräche mit Details (in kleinem always-on-top Windows Fenster anzeigen geht mit Electron)

Live Tetra (Group-)Callmonitor für Tetracontrol

screenshot2

Hiermit lassen sich aktive Gespräche, die von TetraControl erfasst werden, live über Webtechnologien anzeigen.

Sehr hilfreich bei mehreren Funkkreisen und Arbeitsplätzen mit viel Bildschirmplatz, die ein kleines weiteres Fenster anzeigen können.

Es werden bis zu 4 Funkkreise unterstütz, mit Klick auf den blauen Text lassen die sich einfach verstecken/anzeigen.

@kralo
kralo / a_reresolve-dns-windows-powershell.md
Created December 14, 2021 20:47
Wireguard re-resolve dns script for dynamic endpoints (dyndns)

This is a script I use on windows for dynamic DNS endpoints ("servers").

The big upside is that it supports multiple configurations and does not need hard-coded endpoints or "ping-endpoints".

I have tested this in win7 and win10. You might add it to the task scheduler and run this every 3 minutes or so.

Some care has to be taken as to know which user is running the script. The encrypted dpapi-binary file can only be read by the same user that created/saved the tunnels, i.e. \system.

@kralo
kralo / a_Wireguard_Windows_Client_Unprivileged.md
Created September 10, 2021 09:22
wireguard client on windows unprivileged user restart tunnel

Howto install wireguard as tunnel-Service when user is not local administrator.

See the setup .bat for setup. Key here is to set the service rights, so that anyone can restart the service.

See the restart script for how to restart. this is especially useful if the tunnel is "broken", because the peer is behind a dynamic dns service.

@kralo
kralo / a_electron_auto-resize_window_to_content.md
Last active August 15, 2021 18:16
electron_auto-resize_window_to_content

resize the electron app to match the content. Might be used for web-based Asterisk BLI-Pages or other unobstrusive notifications.

Window is always on top on Ubuntu/Windows

@kralo
kralo / linux_v4l2-ctl_example_usage.txt
Created January 26, 2021 13:52
Example usage how to get rough timing debug information
$ v4l2-ctl --stream-mmap --stream-count=2 --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
@kralo
kralo / system-3S1000.ucf
Created October 21, 2013 20:38
ucf System File for Xilinx 3S1000 Spartan 3
## System ucf file For Spartan 3S100
## with aliases such as XSA-3S1000 Board / XST3 / 3S1000 ft256 / ...
## and the XST-3.0 XSTend Board V 3.0
## note: Column-edited with geany
##
## for further information see "Connections Between the XST-3.0 Board and the Various XSA Boards"
## on http://www.xess.com/static/media/manuals/xst-manual-v3_0.pdf#page=24
## marks a new section
# supposed to be CMT-120FPS-OV9281-C411 "Global Shutter, Black/White Image, 120FPS High Frame Rate, USB Camera Module with OV9281 sensor"
# v4l2-ctl
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : USB Camera: USB Camera
Bus info : usb-0000:00:1a.0-1.5
Driver version: 4.15.18
Capabilities : 0x84200001
Video Capture
Streaming
@kralo
kralo / demo-api-javascript-teamup.html
Created January 27, 2016 19:24
Small demo how to display an html widget for calendar events from the teamup API
<!DOCTYPE html>
<html>
<body>
<p>requirejs is used here in order to make the html snippet / widget work in the 1&1 MyWebsite </p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.22/require.min.js"></script>
<div id="CalData"><p>Wird geladen...</p>
</div>
<script type="text/javascript">
require.config({
paths: {