Skip to content

Instantly share code, notes, and snippets.

@sdbbs
sdbbs / CMakeLists.txt
Created August 25, 2023 16:12
C++ example
cmake_minimum_required(VERSION 3.13)
project(mytest C CXX ASM)
set(CMAKE_CXX_STANDARD 17)
set(mytest_sources
main.cpp
)
add_executable(${PROJECT_NAME} ${mytest_sources})
@sdbbs
sdbbs / Makefile
Created January 11, 2023 08:35
cygwin gettext build files
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
@sdbbs
sdbbs / test_cut.c
Created September 29, 2022 14:58
A small C test showing the behavior of strncpy and strndup in terms of cutting / truncating / terminating strings close to the size of buffer
#include <string.h>
#include <stdio.h>
// gcc test_cut.c -o test_cut.exe
// NOTE: MSYS2 OK, MINGW64 headers do not have strndup https://github.com/msys2/MINGW-packages/issues/4999
#define ULINE "0 1 2 3 4 5 6 "
#define LLINE "1234567890123456789012345678901234567890123456789012345678901234567890"
char ubuffer[10];
@sdbbs
sdbbs / !rp2040_fros_printf_test.projectname
Last active July 15, 2022 21:26
rp2040_fros_printf_test example project
We couldn’t find that file to show.
@sdbbs
sdbbs / !rp2040_fros_tmrisr_ex
Created June 21, 2022 08:28
rp2040_fros_tmrisr_ex
rp2040_fros_tmrisr_ex
@sdbbs
sdbbs / FreeRTOSConfig.h
Last active June 1, 2022 12:33
freertos_pico_test
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
/* Use Pico SDK ISR handlers */
#define vPortSVCHandler isr_svcall
#define xPortPendSVHandler isr_pendsv
#define xPortSysTickHandler isr_systick
/*-----------------------------------------------------------
@sdbbs
sdbbs / !MSYS2_makepkg_PKGBUILD_for_tio_with_meson
Last active April 29, 2022 13:50
MSYS2 makepkg PKGBUILD for tio with meson
We couldn’t find that file to show.
# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
<?php
/* --------------------------------------------------------------------
-- (originally from https://enfoldit.com/htpasswd-change-script/)
-- Configurable script to change users in htpasswd
-----------------------------------------------------------------------
-- This script will change users in an htpasswd file using
-- the PEAR Basic Authentication library. It imports header/footer files
-- if they are found so you can customize the look.
--
-- Installation:
$ pandoc notes.md --pdf-engine=xelatex -o notes.pdf
xdvipdfmx:fatal: pdf_link_obj(): passed invalid object.
No output PDF file written.
xdvipdfmx:fatal: pdf_link_obj(): passed invalid object.
No output PDF file written.
Error producing PDF.