Skip to content

Instantly share code, notes, and snippets.

View rtang03's full-sized avatar
🏠
Working from home

rtdoit rtang03

🏠
Working from home
  • Dashslab
View GitHub Profile
@rtang03
rtang03 / main.dart
Created April 4, 2023 11:14
web3auth in flutter
import 'dart:collection';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:web3auth_flutter/enums.dart';
import 'package:web3auth_flutter/input.dart';
import 'package:web3auth_flutter/output.dart';
import 'dart:async';
import 'package:web3auth_flutter/web3auth_flutter.dart';
{
"compilerOptions": {
"target": "ES2019",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2021,
requireConfigFile: false,
sourceType: 'module'
},
plugins: ['@typescript-eslint', 'unused-imports', 'simple-import-sort', 'tailwindcss'],
extends: ['next', 'next/core-web-vitals', 'plugin:tailwindcss/recommended'],
rules: {
@rtang03
rtang03 / createQueryDatabase.ts
Created August 20, 2021 13:58
troubleshooting issue223
import util from 'util';
import Debug from 'debug';
import filter from 'lodash/filter';
import groupBy from 'lodash/groupBy';
import isEqual from 'lodash/isEqual';
import { FTSearchParameters, Redisearch } from 'redis-modules-sdk';
import { Commit, computeEntity, HandlerResponse } from '../types';
import { getLogger, isCommit } from '../utils';
import {
INVALID_ARG,
@rtang03
rtang03 / pacs.008.0001.07.d.ts
Created December 9, 2020 04:12
generated ISO20022 type definition (008.0001.07)
import * as Primitive from './modified_xml-primitives';
// Source files:
// https://www.iso20022.org/sites/default/files/documents/messages/pacs/schemas/pacs.008.001.07.xsd
interface BaseType {
_exists: boolean;
_namespace: string;
}
interface _AccountIdentification4Choice extends BaseType {
version: '2'
networks:
openplatform:
services:
auth:
image: fabric-es/auth-server:1.0
container_name: auth
environment:
// MIT License
// Copyright (c) 2020 Szabolcs Gelencsér
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
import { Commit } from '../types';
export const isCommitRecord = (input: unknown): input is Record<string, Commit> =>
Object.entries(input)
.map(
([key, value]) =>
value?.commitId !== undefined &&
value?.id !== undefined &&
value?.entityId !== undefined &&
value?.version !== undefined &&
@rtang03
rtang03 / bootstrap.sh
Created March 26, 2020 06:46
Experimental Fabric V2 network
#!/usr/bin/env bash
# $1 - docker compose files
# $2 - orderer code ("org0")
# $3 - first org ("org1")
# $4 - list of remaining orgs ("org2 org3")
# $5 - number of orgs (2org / 3org)
. ./scripts/setup.sh
@rtang03
rtang03 / installcc.sh
Created March 26, 2020 06:42
The install cc script
#!/bin/bash
##############
# Environments
##############
export RED='\033[0;31m'
export GREEN='\033[0;32m'
export YELLOW='\033[0;33m'
export NC='\033[0m'