This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"strconv" | |
"github.com/hyperledger/fabric/core/chaincode/shim" | |
"github.com/hyperledger/fabric/protos/peer" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"strconv" | |
"github.com/hyperledger/fabric/core/chaincode/shim" | |
"github.com/hyperledger/fabric/protos/ledger/queryresult" | |
"github.com/hyperledger/fabric/protos/peer" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Chhaileng Blog | |
#server { | |
# server_name chhaileng.com www.chhaileng.com; | |
# return 301 https://www.chhaileng.com$request_uri; | |
#} | |
server { | |
listen 80; | |
server_name chhaileng.com www.chhaileng.com; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.tmux.conf | |
# Change prefix | |
set -g prefix C-a | |
bind C-a send-prefix | |
unbind C-b | |
# Join windows | |
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" | |
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import threading | |
from datetime import datetime | |
import sys | |
import os | |
import mimetypes | |
import urllib.parse | |
import subprocess | |
respTemplate = """HTTP/1.1 {statusNum} {statusCode} |