Skip to content

Instantly share code, notes, and snippets.

@vjanssens
vjanssens / caddy.json
Last active June 22, 2024 16:20
lnav log definition for Caddy server
{
"$schema": "https://lnav.org/schemas/format-v1.schema.json",
"caddy": {
"title": "Caddy Server",
"description": "Caddy Server JSON access logs format",
"url": [
"https://caddyserver.com/docs/caddyfile/directives/log"
],
"json": true,
"timestamp-field": "ts",
@veekaybee
veekaybee / normcore-llm.md
Last active July 21, 2024 13:28
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@MarkRoddy
MarkRoddy / parse_s3_access_logs.sql
Last active February 28, 2024 18:42
DuckDB: Query S3 Access Logs
/*
Usage: you'll want to search for the strings <bucket> and <prefix>, and insert the S3 bucket where your access
logs are being delivered. Use (or delete) <prefix> to filter to a subset of your logs.
*/
/*
These commented out configuration settings you can either run yourself in the REPL and source this file using
`.read parse_s3_access_logs.sql`, or you can uncomment them and supply values for yourself.
@andrewrk
andrewrk / build.zig
Created February 20, 2023 16:20
sprinkling a little zig into a C project to help with debugging
const std = @import("std");
pub fn build(b: *std.Build) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});
// Standard optimization options allow the person running `zig build` to select
@padajo
padajo / cognito-oidc-starter-template.yaml
Created October 21, 2022 17:41
A starter template for creating an OpenID Connect (OIDC) identity provider on Amazon Cognito using SAM/CloudFormation. This creates an identity provider and outputs the /.well-known/openid-configuration and /.well-known/jwks.json URLs for you in the Outputs.
AWSTemplateFormatVersion: "2010-09-09"
Description: >-
openid-connect-app
Testing creating an OpenID Identity Provider with Cognito
Transform:
- AWS::Serverless-2016-10-31
Resources:
@nrjdalal
nrjdalal / QEMU-Silicon-Mac-Virtualization.md
Last active February 1, 2024 05:31
Create Virtual Machines using QEMU on Silicon based Apple Macs

Install QEMU on Silicon based Apple Macs (June 2021)

Option 1 - Automatically

zsh -c "$(curl -fsSL https://raw.githubusercontent.com/nrjdalal/silicon-virtualizer/master/install-qemu.sh)"

Option 2 - Manually

  • Install Xcode command line tools

xcode-select --install
@akihikodaki
akihikodaki / README.en.md
Last active July 20, 2024 07:57
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@citruz
citruz / QEMU_ON_M1.md
Last active June 6, 2024 08:29
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@chrisaycock
chrisaycock / pcap_udp.cpp
Last active December 22, 2023 11:04
Example for accessing UDP packets in a pcap file
// answer to https://quant.stackexchange.com/q/55088/35
// compile with c++ pcap_udp.cpp -lpcap
#include <iostream>
#include <pcap/pcap.h>
#include <netinet/if_ether.h>
#include <netinet/ip.h>
#include <netinet/udp.h>
@devinprater
devinprater / emacspeak-mac.md
Last active July 19, 2024 17:34
Using Emacs, and Emacspeak, on Mac

Emacs, with Emacspeak, on macOS

This guide will, through open source collaboration, spell checking, and Doctor Pepper, show users of Apple (Mac) computers how to install Emacs, Emacspeak, and link the two together for an enjoyable text editing experience, and if there is enough Doctor Pepper, how to best use the included Emacs modes for greater productivity than is provided by newer software. There