Skip to content

Instantly share code, notes, and snippets.

View niklasl's full-sized avatar

Niklas Lindström niklasl

View GitHub Profile
@potiuk
potiuk / SKILL.md
Last active October 1, 2026 17:04
Threat-model rubric used by the ASF Security team's agent skills. Verbatim mirror of .github/skills/threat-model-producer/SKILL.md from the (private) apache/security repo, plus §3.1a tweaks from PR review. Re-imported from Michael Scovetta's gist at https://gist.github.com/scovetta/2dc9a0695c7cbcc32e23799e00d2ced3 (the canonical upstream). Maint…
name threat-model-producer
description Produce an open-source project's threat model — the implicit contract between the project and downstream users (what's in scope, what's out, what's claimed, what's disclaimed). Use when a project needs a threat model for an automated security scan (e.g. Glasswing), to anchor vulnerability-report triage, or when a maintainer asks "what's our security model?". Source — Michael Scovetta's gist `https://gist.github.com/scovetta/2dc9a0695c7cbcc32e23799e00d2ced3`, imported verbatim and bound here as a reusable SKILL.

THREAT MODEL — Skill for Producing Open-Source Project Threat Models

This document is an instruction set for whoever is producing a threat model for an open-source project — a human reviewer, a coding assistant, an automated tooling pipeline, or any combination. It is deliberately

@yookoala
yookoala / 90-mac-superdrive.rules
Last active July 28, 2026 19:08
udev rules to use Apple SuperDrive on Linux
#
# Apple SuperDrive initialization rule
#
# See: https://gist.github.com/yookoala/818c1ff057e3d965980b7fd3bf8f77a6
ACTION=="add", ATTRS{idProduct}=="1500", ATTRS{idVendor}=="05ac", DRIVERS=="usb", RUN+="/usr/bin/sg_raw --cmdset=1 %r/sr%n EA 00 00 00 00 00 01"
@kgersen
kgersen / setup-lxd for crostini.txt
Created February 28, 2019 04:24
setup lxd client in penguin crostini vm (requires ChromeOS linux apps)
source: https://discuss.linuxcontainers.org/t/using-lxd-on-your-chromebook/3823
ctrl-alt-t to access crosh
vsh termina (or vmc start termina)
lxc config set core.https_address :8443
lxc config set core.trust_password some-password
# create an Ubuntu container
lxc launch ubuntu:18.04 c1
# copy the lxc command from it
@niklasl
niklasl / schemaorg_to_jsonldcontext.py
Last active December 30, 2015 19:19
Generates a JSON-LD Context for Schema.org.
from rdflib import *
SDO = Namespace("http://schema.org/")
datatype_coerce_map = {
#SDO.Number: XSD.double,
SDO.Date: 'xsd:date',
SDO.DateTime: "xsd:dateTime",
}
@richhickey
richhickey / thread.clj
Created October 13, 2012 17:43
new thread macros draft
(defmacro test->
"Takes an expression and a set of test/form pairs. Threads expr (via ->)
through each form for which the corresponding test expression (not threaded) is true."
[expr
& clauses]
(assert (even? (count clauses)))
(let [g (gensym)
pstep (fn [[test step]] `(if ~test (-> ~g ~step) ~g))]
`(let [~g ~expr
~@(interleave (repeat g) (map pstep (partition 2 clauses)))]
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE