Skip to content

Instantly share code, notes, and snippets.

View ilovelili's full-sized avatar
🏠
Working from home

min ju ilovelili

🏠
Working from home
View GitHub Profile
@ilovelili
ilovelili / ipfs.sh
Last active July 7, 2021 11:38
ipfs init
sudo apt-get install htop -y # This is not necessary, I just have it for check the resources consumption
sudo apt-get update
sudo apt-get install golang-go -y
export PATH=$PATH:$GOROOT/bin:$GOPATH/
export GOPATH=$HOME/go
wget https://dist.ipfs.io/go-ipfs/v0.4.15/go-ipfs_v0.4.15_linux-amd64.tar.gz
tar xvfz go-ipfs_v0.4.15_linux-amd64.tar.gz
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs
ipfs init
ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080

Credential creation flows using the MONiD Library

Introduction

At MONiD we model verifiable credentials using W3C Verifiable credential specification, aside from some very recent spec modifications. Below you can see an example of a credential, serialized as JSON-LD, stating that the did did:monid:ffcc8f84fae1b6ad253561d7b78167a661d72f58e86e60dbd04cd9b81096cdbe is associated with the email address [email protected]. You might notice that the subject, issuer, and signer of the credential, are the same identity. This can be effectively referred to as a self signed, or self issued, credential.

{

Credential creation flows using the MONiD Library

Introduction

At MONiD we model verifiable credentials using W3C Verifiable credential specification, aside from some very recent spec modifications. Below you can see an example of a credential, serialized as JSON-LD, stating that the did did:monid:ffcc8f84fae1b6ad253561d7b78167a661d72f58e86e60dbd04cd9b81096cdbe is associated with the email address [email protected]. You might notice that the subject, issuer, and signer of the credential, are the same identity. This can be effectively referred to as a self signed, or self issued, credential.

{
  "@context": [
@ilovelili
ilovelili / auth.go
Last active June 13, 2021 07:52
Z様 OAuth1 integration
package handler
import (
"fmt"
"net/http"
"github.com/labstack/echo"
"github.com/woodstock-tokyo/woodstock-zaim/server/util"
)
@ilovelili
ilovelili / chia-farming.sh
Last active May 5, 2021 10:55
chia farming
# first, install
sudo apt-get update
sudo apt-get upgrade -y
git clone https://github.com/Chia-Network/chia-blockchain.git -b latest
cd chia-blockchain
sh install.sh
. ./activate
msg := &messaging.Message{
Data: map[string]string{
"type": "mention",
"commentId": "1",
"picture": "https://cdn.woodstock.club/logo.png",
"name": "min",
"comment": "you are cool",
},
Notification: &messaging.Notification{
Title: category,
@ilovelili
ilovelili / fcm
Last active April 24, 2021 12:19
fcm send message
msg := &messaging.Message{
APNS: &messaging.APNSConfig{
Headers: map[string]string{
"apns-priority": "10",
},
Payload: &messaging.APNSPayload{
Aps: &messaging.Aps{
Alert: &messaging.ApsAlert{
Title: category,
Body: body,
options = {
closable: true,
autoclose: true,
auth: {
redirectUrl: 'http://localhost:3000',
responseType: 'id_token',
params: {
scope: 'openid profile email', // could you check here?
language: 'en',
},
-- delete by tweet id
curl -X DELETE "https://api.woodstock.club/reaction?tweetId=1366154339757137922" -H "accept: */*" -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Im05Rk5kTEdQTGsxb05XbkF6Q0x6diJ9.eyJnaXZlbl9uYW1lIjoiV29vZHN0b2NrIiwiZmFtaWx5X25hbWUiOiJDb250YWN0Iiwibmlja25hbWUiOiJjb250YWN0IiwibmFtZSI6Ildvb2RzdG9jayBDb250YWN0IiwicGljdHVyZSI6Imh0dHBzOi8vbGg0Lmdvb2dsZXVzZXJjb250ZW50LmNvbS8tSlFSSVY0el9lcDQvQUFBQUFBQUFBQUkvQUFBQUFBQUFBQUEvQU1adXVjbWFuSDA2RjNxcFZiUWVVQzJsSDN0RDNsYkdfQS9zOTYtYy9waG90by5qcGciLCJsb2NhbGUiOiJlbiIsInVwZGF0ZWRfYXQiOiIyMDIxLTAzLTA5VDA4OjM3OjAyLjI3N1oiLCJlbWFpbCI6ImNvbnRhY3RAd29vZHN0b2NrLmNsdWIiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6Ly93b29kc3RvY2suanAuYXV0aDAuY29tLyIsInN1YiI6Imdvb2dsZS1vYXV0aDJ8MTAyNTE4MTAzMjE5NDE2MzIzMzM3IiwiYXVkIjoiZ0k2UTFPcVR0QVNwWGhJdDdTRzVESFZBZThSeUpnZlAiLCJpYXQiOjE2MTUyNzkwMjIsImV4cCI6MTYxNjcxOTAyMn0.vthP5EOUJcnpIYEPh2RkDelNUoIn3e_Pqxnyihuc_QFCUTHzL0KAOk0BJWC7oY8c8S3J4bkPe5ATPMR7LdCcAFfhDNqn_2czxdgqzUo72Xw4WK2aBj5DyKDAn43rCCqfOK