Skip to content

Instantly share code, notes, and snippets.

View javereec's full-sized avatar

Jan Vereecken javereec

View GitHub Profile
@javereec
javereec / credential.rb
Created March 8, 2022 07:19
Ruby Verifiable Credential
# Instructions
# tested with ruby 3.1.1
# gem install ed25519
# gem install json-canonicalization
require 'base64'
require 'ed25519'
# require 'json/ext'
require 'json/canonicalization'
require 'openssl'
Project Affiliation SSI Stack Description
VC Authentication with OpenID Connect MATTR + British Columbia Government Secure Connections An adapter that extends OIDC to enable the use of VCs as a means of authentication.
Universal DID Resolver DIF + Danube Tech Secure Connections Software tool for resolving DIDs to obtain their DID Document, works with any DID method.
Universal DID Registrar DIF + Danube Tech Secure Connections Software for registering DIDs on decentralized networks, works with any DID method.
Credential Handler API (CHAPI) Polyfill Digital Bazaar Secure Connections + Secure Data A polyfill is a piece of software (usually JavaScript on the Web) used t
Organization Specification Status SSI Stack Description
W3C Decentralized Identifiers (DIDs) Working Group Secure Connections New type of identifier which is globally unique, highly available & cryptographically verifiable.
W3C Decentralized Identifier (DID) Resolution Community Group Secure Connections Specifies guidelines for resolving and dereferencing DIDs to obtain DID Docs.
W3C DID Spec Registries Working Group Secure Connections Official registry for all known global parameters, properties, and values used by the decentralized identifier ecosystem. Includes the DID Method Registry, a list of DID methods with known implementations.
W3C DID Use Cases Working Group Secure Connections O
defmodule Flow do
use GenServer
defstruct input: nil, data: nil, steps: [], log: [], versioned_input: []
# api
def create(steps, input) when is_list(steps) do
GenServer.start_link(__MODULE__, [steps, input])
end

Keybase proof

I hereby claim:

  • I am javereec on github.
  • I am javereec (https://keybase.io/javereec) on keybase.
  • I have a public key ASAdAsFp3Rp7_-bLDyeD8QD07cEnabw40jhBiT5iF1u1lwo

To claim this, I am signing this object:

@javereec
javereec / .wakeup
Created February 15, 2017 19:44 — forked from ralph089/.wakeup
Restarts Bluetooth Module on Mac OS X El Capitan. You can use the script as shortcut to restart Bluetooth on demand or you can use it with "SleepWatcher" to automatically restart Bluetooth on wakeup (See README.md). I created it, because my Logitech Bluetooth Mouse doesn't stay connected after sleep-mode, so i had to manually re-pair my mouse.
#!/bin/bash
#
# Restart Bluetooth Module on Mac OS X
#
# Requires Blueutil to be installed: http://brewformulas.org/blueutil
BT="/usr/local/bin/blueutil"
log() {
echo "$@"
# Create a product
product_params = %{
description: "some content",
name: "some content",
price: 120.5,
sku: "ABC-123"
}
{:ok, product} = Nova.ProductCommands.create(product_params)
# Create a variant
@javereec
javereec / form.jsx
Last active August 29, 2015 14:27 — forked from syllog1sm/form.jsx
react-bootstrap Form component
/** @jsx React.DOM */
import React from './react-es6';
import classSet from './react-es6/lib/cx';
import BootstrapMixin from './BootstrapMixin';
var Form = React.createClass({
mixins: [BootstrapMixin],
@javereec
javereec / filter
Last active August 29, 2015 14:22 — forked from hofrob/filter
filter {
if [type] == "odoo" {
grok {
match => { "message" => "%{ODOOLOG}" }
}
date {
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss,SSS" ]
}
}
}
@javereec
javereec / gist:592814e76a6f9f95b40e
Created February 7, 2015 19:53
File upload spree api
conn = Faraday.new(url: 'http://veran.lvh.me:3000/', params: { token: 'ac350077d3066be3d2ca79fd0586e1b1d386b88a5870a1c0' }) do |f|
f.request :multipart
f.request :url_encoded
f.adapter :net_http
end
response = conn.post('api/products/abacate-embalagem-de-1kg/images',{image: {attachment: Faraday::UploadIO.new('./image.jpg', 'image/jpeg')}})
##