WIF = base58check encode ([version byte][private key][checksum])
version byte = 80 for mainnet, ef for testnet and regtest
checksum = first 4 bytes of double SHA256 of private key
The following example demonstrates the creation of a raw Omni transaction, which transfers 0.1 Test Omni with token identifier 2 from 1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc to 1Njbpr7EkLA1R8ag8bjRN7oks7nv5wUn3o, with a transaction fee of 0.0006 BTC. For the sake of a demonstration, more than one unspent output was consumed.
List unspent outputs for 1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc.
omnicore-cli "listunspent" 0 999999 '["1K6JtSvrHtyFmxdtGZyZEF7ydytTGqasNc"]'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "strings" | |
| "io/ioutil" | |
| "os" | |
| "path" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| references: | |
| - https://dev.mysql.com/doc/refman/5.7/en/insert-on-duplicate.html | |
| - https://stackoverflow.com/questions/32777081/bulk-insert-and-update-in-mysql | |
| - https://thewebfellas.com/blog/conditional-duplicate-key-updates-with-mysql | |
| */ | |
| /* create a new database and use it */ | |
| drop database if exists test_upsert; | |
| create database test_upsert; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.3.1 | |
| # Install dependencies | |
| RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs | |
| # Set an environment variable where the Rails app is installed to inside of Docker image: | |
| ENV RAILS_ROOT /var/www/app_name | |
| RUN mkdir -p $RAILS_ROOT | |
| # Set working directory, where the commands will be ran: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ciphers | |
| import ( | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/sha512" | |
| "crypto/x509" | |
| "encoding/pem" | |
| "log" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "time" | |
| "github.com/hashicorp/vault/api" | |
| "github.com/hashicorp/vault/builtin/credential/aws" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a full-blown offset-based pagination system modelled after GraphQL-Ruby's | |
| # built-in connections. It has a few different elements: | |
| # | |
| # - `::Page`, a plain ol' Ruby class for modeling _pages_ of things. | |
| # This class handles applying pagination arguments to lists (Arrays and AR::Relations) | |
| # and provides metadata about pagination. (Similar to `will_paginate`.) | |
| # - `Schema::BasePage` is a generic GraphQL-Ruby object type. It's never used directly, | |
| # but it can generate subclasses which wrap _specific_ object types in the schema. | |
| # - `Schema::BaseObject.page_type` is a convenience method for generating page types | |
| # from your object types. You could leave this out and make subclasses with plain ol' |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // SnapCarousel.swift | |
| // prototype5 | |
| // | |
| // Created by xtabbas on 5/7/20. | |
| // Copyright © 2020 xtadevs. All rights reserved. | |
| // | |
| import SwiftUI |