import { Connection, PublicKey, clusterApiUrl, LAMPORTS_PER_SOL, RpcResponseAndContext, AccountInfo } from "@solana/web3.js";
import { AccountLayout, TOKEN_PROGRAM_ID } from "@solana/spl-token";
// ... 省略 ...
const getOwnedTokenAccount = async () : Promise<RpcResponseAndContext<{
pubkey: PublicKey;
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
| use borsh::{BorshDeserialize, BorshSerialize}; | |
| use solana_program::{ | |
| account_info::{next_account_info, AccountInfo}, | |
| entrypoint, | |
| entrypoint::ProgramResult, | |
| msg, | |
| program_error::ProgramError, | |
| pubkey::Pubkey, | |
| }; |
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 golang:1.13.7-alpine3.10 | |
| ADD . /go/src/workspace/ecs-task | |
| WORKDIR /go/src/workspace/ecs-task | |
| RUN go build -o ecs-task && mv ecs-task /bin | |
| CMD /bin/sh ./entrypoint.sh |
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 golang:1.13.7-alpine3.10 | |
| ADD . /go/src/workspace/ecs-task | |
| WORKDIR /go/src/workspace/ecs-task | |
| RUN go build -o ecs-task && mv ecs-task /bin | |
| ENTRYPOINT ecs-task |
Reference: https://blog.golang.org/using-go-modules
export GOPRIVATE=private.com
export GO111MODULE=on
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 ( | |
| "bufio" | |
| "bytes" | |
| "crypto" | |
| "crypto/rand" | |
| "crypto/rsa" | |
| "crypto/x509" | |
| "encoding/base64" |
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
| { | |
| "mappings": { | |
| "shop": { | |
| "properties": { | |
| "id": { | |
| "type": "integer" | |
| }, | |
| "name": { | |
| "type": "string" | |
| }, |
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 ( | |
| "fmt" | |
| "reflect" | |
| "encoding/json" | |
| ) | |
| func StructToMap(data interface{}) map[string]interface{} { |
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
| var json = (function () { | |
| var json = null; | |
| $.ajax({ | |
| 'async': false, | |
| 'global': false, | |
| 'url': 'http://localhost:8888/indkrydsning/app/house/stats_json/', | |
| 'dataType': "json", | |
| 'success': function (data) { | |
| json = data; | |
| } |
NewerOlder