Skip to content

Instantly share code, notes, and snippets.

@dmfutcher
dmfutcher / edinburgh-boundary.geojson
Created October 15, 2022 16:53
Edinburgh Bounding Poly GEOJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dmfutcher
dmfutcher / fia-docwatch.rb
Created November 16, 2021 14:15
Watch for new F1 race documents via FIA doc portal
# Watch the FIA documents portal for new event notes
# (Very quick and dirty but does the job, only tested on macOS)
require 'uri'
require 'net/http'
require 'nokogiri'
previous = nil
while true do
// Super simple TCP echo server using Tokio
// basically a couple tutorials spliced together by DM Futcher (github.com/dmfutcher)
use tokio::net::{TcpListener, TcpStream};
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader};
async fn process_connection(mut stream : TcpStream) {
let (reader, mut writer) = stream.split();
let buf = BufReader::new(reader);
let mut lines = buf.lines();
@dmfutcher
dmfutcher / server.asm
Created July 27, 2015 18:37
TCP Echo server in x86_64 assembly, using Linux system calls.
;; Simple TCP echo server in x86_64 assembly, using Linux syscalls
;;
;; nasm -felf64 -o server.o server.asm
;; ld server.o -o server
;; ./server
;;
global _start
;; Data definitions