Skip to content

Instantly share code, notes, and snippets.

@gazsp
gazsp / prtwifi.asm
Created March 30, 2023 15:34
Spectrum +3 UART driver over printer port (57600, 8N1, +CTS, -RTS)
; ============================================== ===============================================
; RS232 through +3 printer port, 57600, 8N1, +CTS, -RTS
; 57600bps (17,3611μs) 61.57813T on ZX128k, 61T will take 17.19811μs, error -0.9% (58146bps)
; 60.76389T on ZX48k, 61T will take 17.42857μs, error + 0.4% (57377bps)
; Based on some *amazing* work here: https://cygnus.speccy.cz/popis_zx-spectrum_dg192k_rs232.php
; ============================================== ===============================================
; ----------------------------------
; 0xFFD: Printer port data latch (W)
; ----------------------------------
@gazsp
gazsp / move-to-next-monitor.sh
Created April 14, 2022 06:37 — forked from fvdnabee/move-to-next-monitor.sh
Moving a window to the other vertical monitor in XFCE 4
#!/bin/sh
#
# Move the current window to the other vertical monitor. Adapted from the
# scripts for horizontal monitors at makandracards.com
#
# Only works on a 2x1 vertical monitor setup.
# Also works only on one X screen (which is the most common case).
#
# Props to
# http://icyrock.com/blog/2012/05/xubuntu-moving-windows-between-monitors/
<?php
// We can use 'int' to declare the type of parameters we require -
// no need to use is_int() inside the function
function sumMultiplesOf3Or5(int $start, int $end) {
$sum = 0;
if ($start > $end) {
// In a larger program we'd throw an exception here
die("$end must be greater than $start");
### URL / Location
[Provide the URL / location of the issue]
### Device / Browser / User
[Provide information on the device used, browser, user account etc.]
### Problem
# Uncrustify config file for objective-c and objective-c++
###################################################################################################
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
output_tab_size = 4 # new tab size
indent_columns = output_tab_size
indent_label = 2 # pos: absolute col, neg: relative column
indent_align_assign = FALSE