Skip to content

Instantly share code, notes, and snippets.

View bluele's full-sized avatar
building

Jun Kimura bluele

building
View GitHub Profile
@bluele
bluele / 0_reuse_code.js
Created March 5, 2016 06:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
package main
import (
"fmt"
"time"
"github.com/bluele/factory-go/factory"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
)
@bluele
bluele / gh_invalidate_cache.sh
Created July 29, 2022 08:32
A script invalidates all github action's caches for a specified repository
#!/bin/bash
set -eu
# A script invalidates all github action's caches for a specified repository
# API documents: https://docs.github.com/rest/actions/cache
#
# Prerequisites: Install Github CLI and authenticate with your github account.
# For the details, you can see here: https://cli.github.com/manual/
#
# # example:
#!/bin/sh
set -ex
ENCLAVE_PATH=./bin/enclave.signed.so
make all
make yrly
rm -rf ~/.lcp
./bin/lcp enclave init-key --force=true --enclave=${ENCLAVE_PATH}
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {Test, console2} from "forge-std/Test.sol";
library Lib {
struct Packet {
bytes data;
}
No Prev State Counterparty Action Post State Notes
1 OPEN OPEN INIT OPEN(INIT) N/A
2 OPEN OPEN(INIT) INIT OPEN(INIT) N/A
3 OPEN(INIT) OPEN INIT OPEN(INIT) update upgrade state and increment upgrade sequence
4 OPEN(INIT) OPEN(INIT) INIT OPEN(INIT) update upgrade state and increment upgrade sequence
5 OPEN OPEN(INIT) TRY FLUSHING N/A
6 OPEN(INIT) OPEN(INIT) TRY FLUSHING N/A
7 OPEN(INIT) FLUSHING ACK FLUSHING inflight packets exist in src
8 OPEN(INIT) FLUSHING ACK OPEN(ERR) our proposal is incompatible with theirs OR timeout of counterparty proposal is reached