Skip to content

Instantly share code, notes, and snippets.

View bluele's full-sized avatar
coding

Jun Kimura bluele

coding
View GitHub Profile
// 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'
@bluele
bluele / hserve
Last active November 8, 2016 14:52
Startup script for simple http server.
#!/usr/bin/env python
#-*- coding:utf-8 -*-
__author__ = 'bluele'
__version__ = '0.10'
__license__ = 'MIT'
__doc__ = """
# simple running
$ hserve