Skip to content

Instantly share code, notes, and snippets.

@daanporon
daanporon / configtx.yaml
Last active October 15, 2023 00:44
Setting up HLF orderer
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
---
################################################################################
#
# Section: Organizations
#
@daanporon
daanporon / main_go.dart
Created June 22, 2022 07:40
Go example with subnavigation and tabbed navigation
import 'package:flutter/material.dart';
import 'package:go_router_prototype/go_router_prototype.dart';
buildProductRoutes(String product) => ShellRoute(
path: '$product/:pid',
builder: (BuildContext context, Widget child) => ScreenWithBottomNav(
product: product,
child: child,
),
defaultRoute:
@daanporon
daanporon / main_routemaster.dart
Created June 21, 2022 15:29
Routemaster example with subnavigation and tabbed navigation
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:routemaster/routemaster.dart';
buildProductRoutes(String product) {
final routes = <String, PageBuilder>{};
routes['/home/$product'] = (_) => const Redirect('/home');
routes['/home/$product/:pid'] = (_) => CupertinoTabPage(
@daanporon
daanporon / sign.js
Last active January 5, 2019 11:50
Manual sign Multichain transaction
'use strict';
var crypto = require('crypto'),
secp256k1 = require('secp256k1');
var OPS = {
"OP_PUSHDATA1": 76,
"OP_PUSHDATA2": 77,
"OP_PUSHDATA4": 78,
"OP_DUP": 118,
"OP_HASH160": 169,
@daanporon
daanporon / CaDrupalCache.php
Created December 20, 2010 17:46
Cache class that can be used in the ca-sdk-loader project. This integrates with the caching system of Drupal
<?php
class CaDrupalCache {
private $cacheTable = 'cache';
private $expire = 3600;
public function __construct($config=array()) {
if(isset($config['cache_table']) && $config['cache_table'] != null) {
$this->cacheTable = $config['cache_table'];