Skip to content

Instantly share code, notes, and snippets.

View rickmak's full-sized avatar
🎯
Focusing

Rick Mak rickmak

🎯
Focusing
View GitHub Profile
@nnkken
nnkken / main.js
Last active July 21, 2022 12:34
Count online voting power during upgrade
const axios = require('axios');
const BigNumber = require('bignumber.js');
const lcdEndpoint = 'http://localhost:1317';
const rpcEndpoint = 'http://localhost:26657';
const nilVote = 'nil-Vote';
const lcd = axios.create({
baseURL: lcdEndpoint,
@davecoutts
davecoutts / unifi_ubuntu_2004.sh
Last active May 20, 2024 04:59
Install Ubiquiti Unifi Controller on Ubuntu 20.04
# Install Ubiquiti Unifi Controller on Ubuntu 20.04.
# As tested on a fresh install of ubuntu-20.04.1-live-server, August 22nd 2020.
# Thanks to https://gist.github.com/tmuncks for posting the updated install steps.
sudo apt update
sudo apt install --yes apt-transport-https
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@heapwalker
heapwalker / PublicUser.java
Last active December 8, 2016 02:59
To provide a java OO-styled class for reading / writing values to skygear `Record`. And make a Record `Parcelable`.
package com.example.sudoku;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import io.skygear.meta.RecordWrapper;
import io.skygear.skygear.Record;
@bellbind
bellbind / .brewrc
Created August 1, 2011 03:06
[mac][homebrew]install homebrew to $HOME/.brew
#[homebrew setting for installing to each user directory]
#[ENV: put them into "$HOME/.bash_profile"]
HOMEBREW=$HOME/.brew
export PATH=$HOMEBREW/bin:$PATH
export LD_LIBRARY_PATH=$HOMEBREW/lib:/usr/lib
export DYLD_FALLBACK_LIBRARY_PATH=$HOMEBREW/lib
export C_INCLUDE_PATH=$HOMEBREW/include
export CPLUS_INCLUDE_PATH=$HOMEBREW/include