Skip to content

Instantly share code, notes, and snippets.

View morgwai's full-sized avatar

Piotr Morgwai Kotarbinski morgwai

View GitHub Profile
@morgwai
morgwai / wkdurl
Last active January 28, 2022 06:58
A script that gets WKD URL for the email address passed as the argument. See https://datatracker.ietf.org/doc/html/draft-koch-openpgp-webkey-service-13#section-3.1
#!/bin/bash
# Copyright (c) Piotr Morgwai Kotarbinski, Licensed under the Apache License, Version 2.0
usage='usage: wkdurl [--direct | --advanced] user@example.com' ;
if [[ "${#}" -lt 1 ]] || [[ "${#}" -gt 2 ]] ; then
echo "${usage}" >&2 ;
exit 1 ;
fi ;
direct='false' ;
if [[ "${#}" -eq 2 ]] ; then
case "${1}" in
// Copyright (c) Piotr Morgwai Kotarbinski, Licensed under the Apache License, Version 2.0
package pl.morgwai.sample;
import com.aparapi.Kernel;
import com.aparapi.Range;
/**
* Performs pointer-jumping on an array using a GPU with Aparapi. By default sums values from the
@morgwai
morgwai / GrpcServerFlow.java
Last active September 21, 2023 21:52
A _very_ simplified overview of gRPC server flow
/*
* Copyright (c) Piotr Morgwai Kotarbinski
*/
package pl.morgwai.base.grpc.utils;
import io.grpc.Metadata;
import io.grpc.ServerCall;
import io.grpc.ServerCallHandler;
import io.grpc.stub.ServerCallStreamObserver;
import io.grpc.stub.ServerCalls;