Skip to content

Instantly share code, notes, and snippets.

View wonglok's full-sized avatar
🙏
Thank you Jesus for the new life

Wong Lok wonglok

🙏
Thank you Jesus for the new life
View GitHub Profile
@wonglok
wonglok / wildcard_search.dart
Last active August 29, 2015 14:02
AngularDart WildCardFilter :)
library wildcard_filter;
import 'package:angular/angular.dart';
class WildcardFilter{
static final String DEFAULT_SEPARATOR = ' ';
/*
* AngularJS Filter fnc "call"
@wonglok
wonglok / newin.js
Last active August 29, 2015 14:04
newwin.js
var windowObjectReference;
function openRequestedPopup() {
windowObjectReference = window.open(
"data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E<script>console.log(JSON.stringify(window.location))</script>aa",
"DescriptiveWindowName",
"resizable,scrollbars,status"
);
}
@wonglok
wonglok / _.md
Created October 6, 2015 05:15 — forked from stevekinney/_.md
Lorenz Curve
@wonglok
wonglok / wechat-browser-detect.js
Created October 18, 2015 00:34 — forked from loo2k/wechat-browser-detect.js
JavaScript 判断是否微信内置浏览器
// 使用 userAgent 判断是否微信内置浏览器
// 不推荐使用 用户可能会自行修改浏览器的 userAgent
if( navigator.userAgent.toLowerCase().indexOf('micromessenger') > -1 || typeof navgator.wxuserAgent !== "undefined" ) {
return true;
}
// 使用微信 JS 对象判断是否微信内置浏览器
// 建议使用此方法进行判断
if( typeof WeixinJSBridge !== "undefined" ) {
return true;
@wonglok
wonglok / index.html
Created February 4, 2017 00:55
WebGL Cube With Class by Lok Lok
<canvas id="canvas" width="300" height="300" ></canvas>
<br>
<button id="m1"> mode1 </button>
<button id="m2"> mode2 </button>
<button id="m3"> mode3 </button>
<button id="m4"> mode4 </button>
<button id="m5"> mode5 </button>
<br>
<button id="toggle"> Toggle </button>
@wonglok
wonglok / gravity-shapes.markdown
Created February 4, 2017 00:57
Gravity Shapes
@wonglok
wonglok / script.babel
Created February 4, 2017 00:57
WebGL - 3Wave Bally Ball
var util = {
prepShader: (gl, shaderSource, shaderType) => {
var webGLShader = gl.createShader(shaderType);
gl.shaderSource(webGLShader, shaderSource);
gl.compileShader(webGLShader);
var success = gl.getShaderParameter(webGLShader, gl.COMPILE_STATUS);
if(!success){
var error = gl.getShaderInfoLog(webGLShader);
@wonglok
wonglok / index.html
Created February 4, 2017 00:57
Window 3D Flow
<div class="wrapper">
<div class="boxy view-3d" offset="1">
<div class="window">
<div class="win-bar">
Terminal
<span class="f-right">X</span>
</div>
</div>
<div class="window">
@wonglok
wonglok / 3d-page-transition-effect.markdown
Created February 4, 2017 00:57
3D Page Transition Effect
@wonglok
wonglok / index.html
Created February 4, 2017 00:57
Perlin Parallax Animation
<div class="wrapper">
<div class="shape ball"></div>
<div class="shape ball"></div>
<div class="shape ball"></div>
<div class="shape ball"></div>
<div class="shape ball"></div>
<div class="shape ball"></div>
<div class="shape ball"></div>
<div class="shape ball"></div>
<div class="shape ball"></div>