Skip to content

Instantly share code, notes, and snippets.

View jimmychu0807's full-sized avatar
🎯
Focusing

Jimmy Chu jimmychu0807

🎯
Focusing
View GitHub Profile
@jimmychu0807
jimmychu0807 / semaphore-v4-ceremony_attestation.log
Created June 16, 2024 08:49
Attestation for Semaphore V4 Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm jimmychu0807-898091 and I have contributed to the Semaphore V4 Ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphorev4-1)
Contributor # 136
Contribution Hash:
02b0bc08 ee92a2a8 c030b5fb c2059263
36c4f5c9 210366d3 044c958d 64fea3f9
88a4debe a73b7ee5 03e8c38a 1c2bc722
42b93baa 956c6ca4 e148becf 30491f59
@jimmychu0807
jimmychu0807 / self-signed-certificate-with-custom-ca.md
Created November 3, 2020 06:04 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@jimmychu0807
jimmychu0807 / Markdium-javascript.js
Created March 4, 2020 12:06
Markdium-用 Substrate Front-end Template 輕鬆打造你的 React 應用
const accountPair = keyring.getPair(accountAddress);
@jimmychu0807
jimmychu0807 / Markdium-Shell.bash
Created March 4, 2020 12:06
Markdium-用 Substrate Front-end Template 輕鬆打造你的 React 應用
target/release/node-template purge-chain --dev
@jimmychu0807
jimmychu0807 / Markdium-javascript.js
Created March 4, 2020 12:06
Markdium-用 Substrate Front-end Template 輕鬆打造你的 React 應用
//...
import { SubstrateContextProvider, useSubstrate } from './substrate-lib';
import { DeveloperConsole } from './substrate-lib/components';
//...
function Main() {
const [accountAddress, setAccountAddress] = useState(null);
const { apiState, keyring, keyringState } = useSubstrate();
const accountPair =
accountAddress &&
@jimmychu0807
jimmychu0807 / Markdium-javascript.js
Created March 4, 2020 12:06
Markdium-用 Substrate Front-end Template 輕鬆打造你的 React 應用
api.query.<pallet_名字>.<pallet 存儲名字>(回調函數)
@jimmychu0807
jimmychu0807 / Markdium-javascript.js
Created March 4, 2020 12:06
Markdium-用 Substrate Front-end Template 輕鬆打造你的 React 應用
const val = await api.query.templateModule.something();
@jimmychu0807
jimmychu0807 / Markdium-JSONLD.jsonld
Created March 4, 2020 12:06
Markdium-用 Substrate Front-end Template 輕鬆打造你的 React 應用
{
...,
"CUSTOM_TYPES": {
"Price": {
"dollars": "u32",
"cents": "u32",
"currency": "Vec"
},
}
}
@jimmychu0807
jimmychu0807 / Markdium-rust.rs
Created March 4, 2020 12:06
Markdium-用 Substrate Front-end Template 輕鬆打造你的 React 應用
// This module's storage items.
decl_storage! {
trait Store for Module as TemplateModule {
Something get(fn something): Option;
}
}
@jimmychu0807
jimmychu0807 / Markdium-Shell.bash
Created March 4, 2020 12:06
Markdium-用 Substrate Front-end Template 輕鬆打造你的 React 應用
# -- 安裝 NodeJS v12 (https://nodejs.org/en/download/),
# 及 yarn 工具 (https://classic.yarnpkg.com/en/docs/install)
# -- 下載 Substrate 前端模版並跑起來
cd ..
git clone https://github.com/substrate-developer-hub/substrate-front-end-template front-end-template
cd front-end-template
yarn install
yarn start