Skip to content

Instantly share code, notes, and snippets.

Generated with:

task run -- python -m pip install --upgrade strip-hints black python-minifier
PYLOGGING_LEVEL=INFO task run -- git difftool -y -x $(readlink -f devtools/diffrtpy.py) upstream/main | tee /var/tmp/compact.diff

Changes to .flakeheaven.baseline and poetry.lock was removed by hand.

conventional-changelog --config ../x-contrib-rdflib/devtools/conventional-changelog/config.js --context ../x-contrib-rdflib/devtools/conventional-changelog/context.json --help | gh gist create
$ cat  ../x-contrib-rdflib/devtools/conventional-changelog/config.js 
'use strict'

const fs = require('fs')
#!/usr/bin/env bash
set -euo pipefail
OLD_FILE="$(mktemp iptables-save-old.XXXXXXXXXX)"
NEW_FILE="$(mktemp iptables-edit-new.XXXXXXXXXX)"
cleanup() {
for file in "${OLD_FILE}" "${NEW_FILE}"
do
@aucampia
aucampia / Taskfile.yml
Last active July 5, 2023 14:48
Doing a loop with a Taskfile and go-task
# https://taskfile.dev
# Run with no files
# task demo:emtpy
# Run with some files
# task demo:non-empty
version: '3'
vars:
@aucampia
aucampia / README.md
Created March 11, 2023 13:20
compact diff for origin/iwana-20230311T1410-type_path
20230311T141834 iwana@teekai.zoic.eu.org:~/sw/d/github.com/iafork/rdflib.cleanish
$ git status
On branch iwana-20230311T1410-type_path
Your branch is up to date with 'origin/iwana-20230311T1410-type_path'.

nothing to commit, working tree clean
20230311T141844 iwana@teekai.zoic.eu.org:~/sw/d/github.com/iafork/rdflib.cleanish
$ git log -1
commit fd472efae4b3a985b4617a2d958d8167923ded03 (HEAD -> iwana-20230311T1410-type_path, origin/iwana-20230311T1410-type_path)
PYLOGGING_LEVEL=INFO task run -- git difftool -y -x $(readlink -f devtools/diffrtpy.py) upstream/master | tee /var/tmp/compact.diff
gh gist edit https://gist.github.com/aucampia/3f380070fbd8f0e8a99aea2df6cc1f06 -f compact.diff /var/tmp/compact.diff
$ git show
commit 8bad917cbc8213e176a47fd37d24f487485dda17 (HEAD -> master, origin/master, origin/HEAD)
Merge: cdaee274 30e6e27e
Author: Iwan Aucamp <aucampia@gmail.com>
Date: Thu Apr 14 19:46:24 2022 +0200
Merge pull request #1798 from aucampia/iwana-20220409T1540-black_tests
Black tests
@aucampia
aucampia / README.md
Last active September 24, 2021 14:56
SSH into AZDO hosted agents
  1. Create a variable group (e.g. iwana-private)
  2. Add your NGROK_AUTHTOKEN in there
  3. Put your ssh key in pipeline (${your_ssh_key_here})
  4. Run the pipeline

To ssh into it, get the ngrok endpoint from https://dashboard.ngrok.com/endpoints/status

@aucampia
aucampia / output.ttl
Last active July 16, 2021 19:12
rdflib-reification
@prefix egi: <http://example.com/instance/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix schema: <https://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
egi:google a schema:Organization ;
schema:employee egi:bob ;
schema:name "google" .
egi:bob a schema:Person ;
@aucampia
aucampia / gist:193fb185ab674c86569782049fda4f88
Last active February 24, 2021 08:58
xfce4-session crash
(gdb) thread apply all bt
Thread 4 (Thread 0x7f9d8c9e1700 (LWP 74215)):
#0 0x00007f9da62ffcf1 in poll () at /lib64/libc.so.6
#1 0x00007f9da683e9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2 0x00007f9da683eae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3 0x00007f9da683eb31 in glib_worker_main () at /lib64/libglib-2.0.so.0
#4 0x00007f9da6866d4a in g_thread_proxy () at /lib64/libglib-2.0.so.0
#5 0x00007f9da65d915a in start_thread () at /lib64/libpthread.so.0
#6 0x00007f9da630af73 in clone () at /lib64/libc.so.6