Skip to content

Instantly share code, notes, and snippets.

@gordonjcp
gordonjcp / gist:8158896
Last active August 21, 2023 16:11
How to build for arduino with avr-gcc using a Makefile
# simple makefile for avr-gcc projects
# what is the final binary called
PROGRAM = ddsvfo
# flags to pass to the C compiler
# -mmcu should be set to the CPU type
# -DF_CPU should be the clock speed in Hz
# you can add additional -D statements which work just like #define in the code
CFLAGS = -Wall -I. -g -Os -mmcu=atmega168 -DF_CPU=16000000
#!/bin/bash
# add route to AAISP LNS
ip route add 90.155.53.19 via 192.168.1.1 dev usb0
# add route to add-on.ee.co.uk
ip route add 82.192.97.153 via 192.168.1.1 dev usb0
# now remove the default route through ee
# and pass it through AAISP
#!/usr/bin/python
# Copyright (c) 2016, Gordon JC Pearce <[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
from flask import Flask, Blueprint, g
### site blueprint
site = Blueprint('site', __name__)
@site.url_value_preprocessor
def get_site(endpoint, values):
# grab all subdomains, as an example
site = values.pop('site_subdomain')
g.site = site
version: '3.0'
services:
web:
labels:
- traefik.enable=true
- traefik.http.routers.forum.rule=Host(`forum.gjcp.net`)
- traefik.http.routers.forum.entrypoints=websecure
- traefik.http.routers.forum.tls.certresolver=le
- traefik.docker.network=proxy
networks:
@gordonjcp
gordonjcp / lawandorderish.lua
Last active November 19, 2023 10:25
Node tree for titles a bit like the Law & Order ones
{
Tools = ordered() {
SolidBlackBackground = Background {
NameSet = true,
Inputs = {
GlobalOut = Input { Value = 341, },
Width = Input { Value = 1280, },
Height = Input { Value = 720, },
UseFrameFormatSettings = Input { Value = 1, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
{
Tools = ordered() {
BlackBackground = Background {
NameSet = true,
Inputs = {
GlobalOut = Input { Value = 119, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
UseFrameFormatSettings = Input { Value = 1, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
{
Tools = ordered() {
BargraphSize = RectangleMask {
NameSet = true,
Inputs = {
Filter = Input { Value = FuID { "Fast Gaussian" }, },
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1 }, },
UseFrameFormatSettings = Input { Value = 1, },