Skip to content

Instantly share code, notes, and snippets.

View zjhiphop's full-sized avatar
🎯
Focusing

newboy zjhiphop

🎯
Focusing
  • cloud-tea
  • USA
View GitHub Profile
@zjhiphop
zjhiphop / WebGL-frameworks-libraries.md
Created January 24, 2018 07:33 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL frameworks and libraries

A non-exhaustive list of WebGL frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are outdated/not maintained anymore.

Engines and libraries

  • three.js: JavaScript 3D library
  • stack.gl: an open software ecosystem for WebGL, built on top of browserify and npm.
  • PixiJS: Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback
  • Pex: Pex is a javascript 3d library / engine allowing for seamless development between Plask and WebGL in the browser.
  • Babylon.js: a complete JavaScript framework for building 3D games with HTML 5 and WebGL
  • SceneJS: An extensible WebGL-based engine for high-detail 3D visualisation
  • Blend4Web: a tool for interactive 3D visualization on the Internet
@zjhiphop
zjhiphop / tcp-socketio-sample.js
Created September 18, 2017 07:09 — forked from maripiyoko/tcp-socketio-sample.js
Node.js Tcp server & Socket.io
// socket io
var app = require('http').createServer(handler),
io = require('socket.io').listen(app),
fs = require('fs');
app.listen(3000, function() {
console.log('Socket IO Server is listening on port 3000');
});
function handler(req, res) {
@zjhiphop
zjhiphop / RestServer.php
Created August 30, 2017 06:12 — forked from jasdeepkhalsa/RestServer.php
Simple PHP REST / JSON Server with example.php by Jake Sankey (http://jakesankey.com/blog/2012/09/php-simple-rest-server/)
<?php
class RestServer
{
public $serviceClass;
public function __construct($serviceClass)
{
$this->serviceClass = $serviceClass;
}
@zjhiphop
zjhiphop / gist:872ec0cd0ccaf6b5ac7d5bc880f8ab13
Created April 20, 2017 08:27 — forked from Faithree/gist:f8b84de4a300a6a42c2f4a1a46a08872
关于vue+node前后端分离,前端跨域的方案
昨天在做登陆请求的时候,脑子一抽,想试试原生的ajax来请求后台,这时候我就写下了下面的代码,
```
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status >= 200 && xhr.status < 300 || xhr.status == 304) {
console.log(xhr.responseText)
} else {
//错误处理
@zjhiphop
zjhiphop / avoiding-exceptions.js
Created February 5, 2017 02:54 — forked from eiriklv/avoiding-exceptions.js
Exception free JavaScript?
/**
* WHY? - BECAUSE EXCEPTIONS/TRY/CATCH IS A GLOBAL HORRIBLE MESS :-(
* Check out error handling in golang: https://blog.golang.org/error-handling-and-go
*/
/**
* Wrap an "unsafe" promise
*/
function safePromise(promise) {
return promise
@zjhiphop
zjhiphop / nginx_config.md
Created November 7, 2016 10:17 — forked from Mioke/nginx_config.md
Mac OS下安装及配置nginx
# Reference:
https://www.cloudgear.net/blog/2015/5-minutes-kubernetes-setup/
# install homebrew and cask
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install virtualbox
brew cask install virtualbox
# install dockertoolbox
❯ rollup --version
rollup version 0.25.3
❯ time rollup -c ./rollup.js
rollup -c ./rollup.js 4.65s user 0.22s system 118% cpu 4.131 total
❯ time webpack
Hash: ebb00bbccd954c114d3c
Version: webpack 2.0.7-beta
Time: 3623ms
@zjhiphop
zjhiphop / app.scss
Created July 11, 2016 07:42 — forked from malixsys/app.scss
ionic framework validation
form i.icon.error {
color: $assertive;
}
form input + i.icon.error {
display: none;
margin-left: 8px;
}
form.ng-submitted input.ng-invalid + i.icon.error {
@zjhiphop
zjhiphop / config.json
Created December 30, 2015 02:52 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",