Skip to content

Instantly share code, notes, and snippets.

👷
Building

Mitchell Wong Ho mitchwongho

👷
Building
Block or report user

Report or block mitchwongho

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View raspberry_pi_openvpn_tips.md

OpenVPN host config files:

$ cd /etc/openvpn

OpenVPN config file:

$ sudo nano /etc/default/openvpn
@mitchwongho
mitchwongho / HelloWorld.kt
Last active Aug 29, 2018
A trivial Gradle build file for a Kotlin application
View HelloWorld.kt
fun main(args: Array<String>) {
MyFirstClass("Hello, My First Class").out()
}
class MyFirstClass(val message: String) {
fun out() {
println(message)
}
}
@mitchwongho
mitchwongho / android-basic.js
Last active Apr 17, 2018
Appium Android Basic session script
View android-basic.js
const wdio = require('webdriverio');
// Driver options
const opts = {
port: 4723,
desiredCapabilities: {
platformName: "Android",
platformVersion: "8.0",
deviceName: "Nexus 5X API 26",
app: "ApiDemos-debug.apk",
appPackage: "io.appium.android.apis",
@mitchwongho
mitchwongho / installation.md
Last active Apr 16, 2018
Getting Up and Running with Appium
View installation.md
$ brew install node      # get node.js
$ npm install -g appium  # get appium server
$ npm install webdriverio     # get the appium WebDriver client
@mitchwongho
mitchwongho / btcd.conf
Created Jan 25, 2018
Lightning & btcd setup
View btcd.conf
...
; Secure the RPC API by specifying the username and password. You can also
; specify a limited username and password. You must specify at least one
; full set of credentials - limited or admin - or the RPC server will
; be disabled.
rpcuser=w1/AxcoqWFqsey/x7C9drhaaWl8=
rpcpass=zGnTDRT4a7Pzn9j31n6D0c3S0vs=
@mitchwongho
mitchwongho / blockstack.id
Created Nov 10, 2017
Blockstack ID Github verification
View blockstack.id
Verifying my Blockstack ID is secured with the address 12fmp8MHaSmzZbR3iu77hysmd9C5zpLKPs https://explorer.blockstack.org/address/12fmp8MHaSmzZbR3iu77hysmd9C5zpLKPs
View ObservableRealms-Person.java
package com.mitchwongho.test.observablerealms.realms;
import android.support.annotation.NonNull;
import java.util.UUID;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
/**
@mitchwongho
mitchwongho / ObservableRealms.java
Created Nov 24, 2016
I text app to exercise Observable RealmResults
View ObservableRealms.java
package com.mitchwongho.test.observablerealms;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import com.mitchwongho.test.observablerealms.realms.Person;
import java.util.concurrent.TimeUnit;
@mitchwongho
mitchwongho / osmc_expressvpn_openvpn.md5
Last active Apr 17, 2019
Setting Up TunnelBear or ExpressVPN (using OpenVPN) On OSMC
View osmc_expressvpn_openvpn.md5
# Setting Up ExpressVPN (OpenVPN) On OSMC
## References
- [Brian Hornsby' Kodi OpenVPN plugin](http://brianhornsby.com/blog/how-to-setup-your-vpn-client)
- [Install and Configure OpenVPN on OSMC/Kodi](https://nerddrivel.com/2016/03/25/install-and-configure-openvpn-on-osmckodi/)
- [ExpressVPN - High speed, ultra secure, and easy to use. Instant setup.](https://www.expressvpn.com/)
- [[HOWTO] OSMC/Rasp Pi as OpenVPN client](https://discourse.osmc.tv/t/howto-osmc-rasp-pi-as-openvpn-client/1844/71)
## Steps
View RealmObjectFetchOnSubscribe.java
package com.github.mitchwongho.android.beacon.database.rx;
import android.content.Context;
import android.support.annotation.NonNull;
import io.realm.Realm;
import io.realm.RealmChangeListener;
import io.realm.RealmObject;
import io.realm.RealmResults;
import rx.Observable;
You can’t perform that action at this time.