Skip to content

Instantly share code, notes, and snippets.

View kwunyeung's full-sized avatar
💛
When we are all yellow...

Kwun Yeung kwunyeung

💛
When we are all yellow...
View GitHub Profile
<?php
/**
* Coordinates.php
* An utility for converting HK80 to WGS84 coordinates
*
* Copyright (C) 2010, 2013 Kelvin Wong
* Licensed under the MIT License (http://opensource.org/licenses/MIT)
*
* Note: For the glossaries and conventions for coordinates convertion, please refer to
* the website of Geodetic Survey of Hong Kong.
@kwunyeung
kwunyeung / SearchBar.jsx
Last active May 7, 2018 03:46
Search bar
toggleSearchInput = e => {
e.preventDefault();
this.setState({isShown = !this.state.isShown});
}
render(){
return
<div>
(this.state.isShown?
<SearchInput />:''}
@kwunyeung
kwunyeung / gaiad.service
Last active January 12, 2023 14:03
systemd unit file of Cosmos gaia testnet
[Unit]
Description=Cosmos Gaia Node
After=network-online.target
[Service]
User=gaiad
ExecStart=/opt/go/bin/gaiad start --home=/opt/gaiad/
Restart=always
RestartSec=3
LimitNOFILE=4096
@kwunyeung
kwunyeung / gaia_install.sh
Last active January 13, 2023 06:28
bash script for installing go and gaia cosmoshub-1 on Ubuntu
#!/bin/bash
# Upgrade the system and install go
sudo apt update
sudo apt upgrade -y
sudo apt install gcc git make -y
sudo snap install --classic go
sudo mkdir -p /opt/go/bin
# Export environment variables
@kwunyeung
kwunyeung / gaia_upgrade.sh
Last active January 13, 2023 06:29
script to upgrade the Cosmos gaia testnet
#!/bin/bash
# Upgrade Cosmos SDK and restart gaiad
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-t|--tag)

Keybase proof

I hereby claim:

  • I am kwunyeung on github.
  • I am kwunyeung (https://keybase.io/kwunyeung) on keybase.
  • I have a public key ASBKle1_ImJusPpwHeOAlNI6BMlKmtb2b-UB_JAZJedtego

To claim this, I am signing this object:

@kwunyeung
kwunyeung / addrbook.json
Created December 12, 2018 07:03
address book of genki-2000
{
"key": "396c2b6ffff9f409da13997b",
"addrs": [
{
"addr": {
"id": "4173a31e168b139989d87d2a3e6462ba138c6e74",
"ip": "85.214.84.224",
"port": 26656
},
"src": {
@kwunyeung
kwunyeung / iris_install.sh
Last active April 27, 2019 15:48
Install IRIShub
#!/bin/bash
# Upgrade the system and install go
sudo apt update
sudo apt upgrade -y
sudo apt install gcc git make -y
sudo snap install --classic go
sudo mkdir -p /opt/go/bin
# Export environment variables
@kwunyeung
kwunyeung / iris_upgrade.sh
Created May 31, 2019 06:15
Upgrade IRISnet
#!/bin/bash
# Upgrade IRIS and restart gaiad
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-t|--tag)
@kwunyeung
kwunyeung / kava_install.sh
Created June 27, 2019 13:19
Install Kava node
#!/bin/bash
# Upgrade the system and install go
sudo apt update
sudo apt upgrade -y
sudo apt install gcc git make -y
sudo snap install --classic go
sudo mkdir -p /opt/go/bin
# Export environment variables