Skip to content

Instantly share code, notes, and snippets.

@peterhpchen
peterhpchen / demo.html
Created March 29, 2014 07:51
this is a simple demo for getUserMedia.
<!--Don't forget to add autoplay attribute-->
<video id="mediaStreamDemo" autoplay></video>
@peterhpchen
peterhpchen / Chat.html
Created April 3, 2014 01:38
hello SignalR
<!DOCTYPE html>
<html>
<head>
<title>SignalR Simple Chat</title>
<style type="text/css">
.container {
background-color: #99CCFF;
border: thick solid #808080;
padding: 20px;
margin: 20px;
@peterhpchen
peterhpchen / Connection.js
Created April 4, 2014 02:22
RTCPeerConnection
var webRTCHub = $.connection.rtcHub;
webRTCHub.client.sendMessage = sendMessage;
$.connection.hub.start(startHub);
@peterhpchen
peterhpchen / rtcHub.cs
Created April 16, 2014 15:06
RTCPeerConnection Demo
using System;
using System.Web;
using Microsoft.AspNet.SignalR;
namespace WebRTC.RTCPeerConnection
{
public class rtcHub : Hub
{
public void Send(string message)
{
@peterhpchen
peterhpchen / RTCPeerConnection.html
Last active June 29, 2016 10:13
RTCPeerConnection simple demo
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>RTCPeerConnection API Demo</title>
</head>
<body>
<div>
<button id="startBtn">Start</button>
<button id="callBtn">Call</button>
@peterhpchen
peterhpchen / checkboxs.html
Last active August 29, 2015 14:00
control remote peer's video and audio
<input type="checkbox" id="disabledVideo"/>Disabled remote video
<input type="checkbox" id="disabledAudio"/>Disabled remote audio
@peterhpchen
peterhpchen / addNDK
Created May 16, 2014 03:58
Android NDK test
ndk.dir=C\:/Android/android-ndk-r9d
@peterhpchen
peterhpchen / Android.mk
Created May 17, 2014 17:06
ndk-build by self
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := MyLib
LOCAL_SRC_FILES := main.c
include $(BUILD_SHARED_LIBRARY)
@peterhpchen
peterhpchen / Login.cs
Created June 27, 2014 06:38
Automate login apple developer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Net;
using HtmlAgilityPack;
namespace AppleDeveloper
@peterhpchen
peterhpchen / cmd
Created July 7, 2014 14:15
install rxnorm api
cd [應用程式路徑]
"[wsdl路徑]\wsdl.exe" /l:CS /protocol:SOAP http://rxnav.nlm.nih.gov/RxNormDBService.xml