Skip to content

Instantly share code, notes, and snippets.

View bluele's full-sized avatar
coding

Jun Kimura bluele

coding
View GitHub Profile
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
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {Test, console2} from "forge-std/Test.sol";
library Lib {
struct Packet {
bytes data;
}
#!/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}
@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:
package main
import (
"fmt"
"time"
"github.com/bluele/factory-go/factory"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
)
@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
@bluele
bluele / targz.go
Created September 28, 2015 05:18
Golang compress tar.gz example.
package main
import (
"archive/tar"
"compress/gzip"
"io/ioutil"
"log"
"os"
"path"
)
@bluele
bluele / google_image_search.py
Last active September 15, 2022 22:20
Python script for Google search by image
#-*- coding:utf-8 -*-
from BeautifulSoup import BeautifulSoup as b
from urllib import quote_plus as q, unquote_plus as unq, urlencode
from urllib2 import build_opener, urlopen, HTTPCookieProcessor
from cookielib import CookieJar
import urlparse
import re
__author__ = 'bluele'
@bluele
bluele / kickstat.py
Last active December 15, 2015 18:48
get stats of kickstarter' project
#-*- coding:utf-8 -*-
__author__ = 'bluele'
from BeautifulSoup import BeautifulSoup as bs
import urllib
import requests
import re
class Project(object):
@bluele
bluele / tvschedule.py
Created April 2, 2013 22:47
Get tv schedule.
#-*- coding:utf-8 -*-
__author__ = 'bluele'
from BeautifulSoup import BeautifulSoup as bs
import requests
import re
url = 'http://program.tv.jp.msn.com/tv.php?site=032&mode=06&category=g&area=013&template=program&sdate=20130321&lhour=7&shour=05'
host = 'http://program.tv.jp.msn.com/tv.php'