Skip to content

Instantly share code, notes, and snippets.

View ashleysommer's full-sized avatar

Ashley Sommer ashleysommer

View GitHub Profile
@ashleysommer
ashleysommer / test_240.py
Created September 25, 2024 09:15
PySHACL Issue #240
# -*- coding: utf-8 -*-
#
"""
https://github.com/RDFLib/pySHACL/issues/240
"""
import sys
import rdflib
import pyshacl
@ashleysommer
ashleysommer / error.log
Created May 14, 2024 11:08
Error from azurerm_network_interface_backend_address_pool_association: CannotMixIPBasedAddressesAndIPConfigurationsOnLoadBalancerBackendAddressPool
2024-05-14T21:05:13.346+1000 [DEBUG] provider.terraform-provider-azurerm_v3.103.1_x5: Determining which Resource Providers require Registration: timestamp="2024-05-14T21:05:13.345+1000"
2024-05-14T21:05:13.346+1000 [DEBUG] provider.terraform-provider-azurerm_v3.103.1_x5: All required Resource Providers are registered: timestamp="2024-05-14T21:05:13.345+1000"
azurerm_network_interface_backend_address_pool_association.my_nic_address_pool: Creating...
2024-05-14T21:05:13.347+1000 [INFO] Starting apply for azurerm_network_interface_backend_address_pool_association.my_nic_address_pool
2024-05-14T21:05:13.348+1000 [DEBUG] azurerm_network_interface_backend_address_pool_association.my_nic_address_pool: applying the planned Create change
2024-05-14T21:05:13.348+1000 [INFO] provider.terraform-provider-azurerm_v3.103.1_x5: preparing arguments for Network Interface <-> Load Balancer Backend Address Pool Association creation.: timestamp="2024-05-14T21:05:13.348+1000"
2024-05-14T21:05:13.348+1000 [DEBUG] provider.terrafo
@ashleysommer
ashleysommer / main.tf
Last active May 15, 2024 07:14
Minimal reproduction of CannotMixIPBasedAddressesAndIPConfigurationsOnLoadBalancerBackendAddressPool error
locals {
location = "Australia East"
zones = [1, 2, 3]
}
resource "azurerm_resource_group" "my_rg" {
location = local.location
name = "minimal_rg"
}
resource "azurerm_public_ip" "my_lb_public_ip_address" {
@ashleysommer
ashleysommer / starship.toml
Created February 6, 2024 09:22
starship.toml with Monokai Pro Dark palette
"$schema" = 'https://starship.rs/config-schema.json'
format = """
[](color_red)\
$os\
$username\
[](bg:color_yellow fg:color_red)\
$directory\
[](fg:color_yellow bg:color_aqua)\
$git_branch\
@ashleysommer
ashleysommer / .zshrc
Created January 2, 2024 23:43
~/.zshrc
# Do this first, to keep zprofile->zshrc ordering correct
if [ -z "$SYSTEM_ZPROFILED_LOADED" ]; then
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.zsh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
@ashleysommer
ashleysommer / zprofile
Created January 2, 2024 23:24
/etc/zsh/zprofile
# /etc/zsh/zprofile: system-wide .zprofile file for zsh(1).
#
# This file is sourced only for login shells (i.e. shells
# invoked with "-" as the first character of argv[0], and
# shells invoked with the -l flag.)
#
# Global Order: zshenv, zprofile, zshrc, zlogin
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.zsh; do
@ashleysommer
ashleysommer / wezterm.lua
Last active February 6, 2024 09:21
.config/wezterm/wezterm.lua
local wezterm = require 'wezterm'
local config = {}
config.front_end = "WebGpu"
config.font = wezterm.font 'FantasqueSansMono Nerd Font Mono'
config.font_size = 12
config.dpi = 110
;config.color_scheme = 'Builtin Solarized Dark'
config.color_scheme = 'Monokai Dark (Gogh)'
config.bold_brightens_ansi_colors = "BrightOnly"
@ashleysommer
ashleysommer / test_186.py
Created June 4, 2023 23:49
Pyshacl Test Issue 186
# -*- coding: utf-8 -*-
"""
https://github.com/RDFLib/pySHACL/issues/186
"""
import rdflib
from pyshacl import validate
shacl_file = """{
"@context": {
@ashleysommer
ashleysommer / issue_148.py
Created June 30, 2022 00:54
Example of using ont_graph and "inplace=True"
import rdflib
from pyshacl import validate
shacl_file = """\
@prefix ex: <urn:ex#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@ashleysommer
ashleysommer / issue_142.py
Created June 30, 2022 00:42
Using ont_graph to mix-in ontology definitions at validation runtime
import rdflib
from pyshacl import validate
shacl_file = """\
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix ex: <http://example.com/ns#> .