Skip to content

Instantly share code, notes, and snippets.

View markwilkinson's full-sized avatar

Mark Wilkinson markwilkinson

View GitHub Profile
@markwilkinson
markwilkinson / gist:62502a1010cd0683b595040c76e52d2f
Created February 17, 2025 12:36
Using Ruby Distiller command line to do a SHACL validation
rdf shacl --input-format turtle --shape ./metric.shacl ./metric.ttl
@markwilkinson
markwilkinson / solid_authorize_and_post.rb
Created August 12, 2024 11:57
An attempt to show how to interact with the SOLID POD Community Solid Server with as much transparency as possible. Code in Ruby, but it is easy to port!
# This is written in the Ruby language, but it tries to avoid using
# too many libraries that will obfuscate what is happening.
# The REST calls are explicit so you can see all of the required
# parameters at each point. Nothing is assumed #(including your own WebID!)
# though of course, you will already know that.
# You will possibly also already have a token
#
# In this example, you are assumed to be running the Community Server
# on port 3000 (e.g. via the docker image). You have already created an account
# your username and password are in the environemnt variables
@markwilkinson
markwilkinson / Export Access DB to csv command line
Created December 14, 2023 12:23 — forked from juanobrach/Export Access DB to csv command line
Export to CSV access database with PowerShell command line
Run Power Shell script on comand line "./access-export-to-csv-power-shell.ps1"
Requirements
Database1 file or rename database name on script
Export query created as module on the DB
Public Sub export_query()
DoCmd.TransferText transferType:=acExportDelim, TableName:="Table1", FileName:="D:\Exported.csv", HasFieldNames:=True
DoCmd.Quit
End Sub
@markwilkinson
markwilkinson / 10-proxy.conf
Created July 2, 2023 05:52
Proxy subdomain to server/port using lighttpd
# /usr/share/doc/lighttpd/proxy.txt
server.modules += ( "mod_proxy" )
## Balance algorithm, possible values are: "hash", "round-robin" or "fair" (default)
# proxy.balance = "hash"
$HTTP["host"] == "subdomain.domain.org" {
# proxy.balance = "hash"
proxy.server = ( "" =>
@markwilkinson
markwilkinson / launch.json
Created December 4, 2021 07:57 — forked from vaiorabbit/launch.json
VSCode settings for ruby debugging
{
// IntelliSense を使用して利用可能な属性を学べます。
// 既存の属性の説明をホバーして表示します。
// 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug Local File",
"type": "Ruby",
"request": "launch",
@markwilkinson
markwilkinson / registerServices.py
Last active April 14, 2021 12:15
Bootstrap script for The Evaluator database
import json
import requests
import re
serviceURL = "http://localhost:8080/index.rb"
evaluatorURL ="http://localhost:3000/FAIR_Evaluator/metrics"
headers = {"Accept": "application/json", "Content-type": "application/json"}
@markwilkinson
markwilkinson / gbcov19_2_CrateRDF
Created April 11, 2020 13:51
Code fragments for generating RO Crate-compliant RDF from Genbank YAML of CoV19 sequences
require 'yaml'
require 'sparql/client'
require 'ro_crate_ruby'
require 'rdf'
require 'json'
require 'rdf/json'
require 'json/ld'
require 'json/ld/preloaded'
require 'rdf/trig'
require 'rdf/raptor'