Skip to content

Instantly share code, notes, and snippets.

@frankhinek
frankhinek / marathon-python3-docker.json
Last active August 29, 2015 14:05
Marathon Task description for Python3 Docker container.
{
"cmd": "env && python3 -m http.server $PORT0",
"container": {
"docker": {
"image": "python:3"
},
"type": "DOCKER"
},
"cpus": 0.25,
"healthChecks": [

Keybase proof

I hereby claim:

  • I am frankhinek on github.
  • I am frankhinek (https://keybase.io/frankhinek) on keybase.
  • I have a public key whose fingerprint is A3AB 596B 6C50 4E14 649A CA01 94BE 8F29 5A99 120F

To claim this, I am signing this object:

@frankhinek
frankhinek / build_tf.sh
Last active September 23, 2020 15:19 — forked from venik/build_tf.sh
Bash script for local building TensorFlow on Mac with all CPU optimizations (default pip package has only SSE)
# Check whether script is executing in a VirtualEnv or Conda environment
if [ -z "$VIRTUAL_ENV" ] && [ -z "$CONDA_PREFIX" ] ; then
echo "VirtualEnv or Conda env is not activated"
exit -1
fi
# Set the virtual environment path
if ! [ -z "$VIRTUAL_ENV" ] ; then
VENV_PATH=$VIRTUAL_ENV
elif ! [ -z "$CONDA_PREFIX" ] ; then
import { DataStream, Dwn, MessageStoreLevel, RecordsQuery, RecordsWrite } from '@tbd54566975/dwn-sdk-js';
import { createProfile, randomBytes } from './utils.js';
const dwn = await Dwn.create({messageStore});
const alice = await createProfile();
const dataBytes = randomBytes(32);
let dataStream = DataStream.fromBytes(dataBytes);
@frankhinek
frankhinek / README.md
Last active April 14, 2023 10:27
Determining URL scheme handlers in macOS

Determining URL scheme handlers in macOS

Credit for code to Joel Bruner in this post.

Usage

Get Bundle ID for Registered Handler

@frankhinek
frankhinek / index.html
Last active April 26, 2023 20:41
Web5 CRUD Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web5 CRUD Example</title>
<script src="https://unpkg.com/@tbd54566975/web5"></script>
</head>
@frankhinek
frankhinek / index.html
Created April 27, 2023 21:24
Protocol Example with Alice & Bob DWNs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Protocol Example with Alice & Bob DWNs</title>
<script src="https://unpkg.com/@tbd54566975/web5"></script>
</head>
@frankhinek
frankhinek / example.md
Last active February 9, 2024 18:32
DID DHT Pkarr <-> DID Document

Example 1 - With service entry

Hex string encoded:

19c356a57605e7be8d101e211137dec2bbb875f076a60866529eff68372380c63e435c852bf3
dbc6fa4bbda014c561af361cace90c91350477c010769a9910060000000065b035ce00008400
0000000300000000035f6b30045f646964343177696161616f61677a63656767736e77667a6d
78356377656f67356d736734753533366d627938737179336d6b703377796b6f000010000100
001c2000373669643d303b743d303b6b3d6c53754d5968673132494d6177714675742d325552
413231324e7165382d574542374f426c616d356f4255035f7330045f64696434317769616161
@frankhinek
frankhinek / Output.md
Last active February 16, 2024 21:03
Test Transitive Dependency

Output of node test.js:

node test.js
BearerDid {
  uri: 'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo',
  document: {
    id: 'did:dht:5mbfn6pzwdxzmp6zzghqrk8tmo7j8mqahhf3cmtggfjsrjgdfouo',
    verificationMethod: [ [Object] ],
 authentication: [