Skip to content

Instantly share code, notes, and snippets.

View yimingkuan's full-sized avatar

yiming.kuan yimingkuan

  • Mirantis
  • Kuala Lumpur, Malaysia
View GitHub Profile
#!/usr/bin/env bash
# Required tools
DOCKER="${DOCKER:-docker}"
NSENTER="${NSENTER:-nsenter}"
BRIDGE="${BRIDGE:-bridge}"
IPTABLES="${IPTABLES:-iptables}"
IP="${IP:-ip}"
NSDIR=/var/run/docker/netns

Keybase proof

I hereby claim:

  • I am yimingkuan on github.
  • I am yimingwuzere (https://keybase.io/yimingwuzere) on keybase.
  • I have a public key whose fingerprint is 7781 60AA 19EA 4DBA 5717 D624 CC41 9D2E EA4F 0E3D

To claim this, I am signing this object:

<?xml version="1.0" encoding="UTF-8"?>
<!-- The basic details of the app. Docs here: http://docs.build.phonegap.com/en_US/configuring_basics.md.html -->
<!-- versionCode is optional and Android only -->
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.example"
versionCode = "10"
version = "1.0.0" >
<name>PhoneGap Example</name>
@yimingkuan
yimingkuan / index.html
Last active August 29, 2015 14:19
File transfer example
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript">
function onBodyLoad() {
document.addEventListener("deviceready", onDeviceReady, false);
@yimingkuan
yimingkuan / getCurrentPosition.html
Last active August 29, 2015 14:07
getCurrentPosition on Cordova/PhoneGap using the Geolocation plugin
<!DOCTYPE html>
<html>
<head>
<title>getCurrentPosition</title>
<script src="cordova.js" type="text/javascript"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="text/javascript" charset="utf-8">
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {