Skip to content

Instantly share code, notes, and snippets.

View sorskoot's full-sized avatar
🌷
Developing cool stuff

Sorskoot sorskoot

🌷
Developing cool stuff
View GitHub Profile
@sorskoot
sorskoot / app.js
Created March 3, 2017 07:42
Getting started with Node.js on ChakraCore - Express.js example
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Hello World!');
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});
@sorskoot
sorskoot / install express-generator
Last active March 6, 2017 15:36
install express-generator though npm
npm install express-generator -g
@sorskoot
sorskoot / bootstrap express
Created March 6, 2017 15:42
bootstrap express
express --view=pug --css=sass --git
@sorskoot
sorskoot / users.js
Created March 7, 2017 15:16
default users.js routing file
var express = require('express');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res, next) {
res.send('respond with a resource');
});
module.exports = router;
@sorskoot
sorskoot / advanced-routing.js
Last active March 15, 2017 22:48
Express.js route to success
router.all('*', function(req, res, next){
//…
next();
});
router.get('/p/:name', function(req, res, next){
//…
});
router.param('name', function(req, res, next, name){
@sorskoot
sorskoot / index.html
Created November 26, 2017 21:22
Very basic A-Frame Scene with Red Cube
<html>
<head>
<script src="https://aframe.io/releases/0.7.1/aframe.min.js"></script>
</head>
<body>
<a-scene>
<a-box color="red" position="-1 0.5 -3" ></a-box>
</a-scene>
</body>
</html>
@sorskoot
sorskoot / index.html
Last active May 27, 2018 20:19
BabylonJS WebVR Hello World
<canvas id="renderCanvas"></canvas>
div // weight of 1
#post span // weight of 100 + 1 = 101
<div id="post"><span style="color: #ff0000">Post Text</span></div> // weight of 1000
/* Babylon Mesh Component Template */
module PROJECT {
export class Shoot extends BABYLON.MeshComponent {
distance: number;
public constructor(owner: BABYLON.AbstractMesh, scene: BABYLON.Scene, tick: boolean = true, propertyBag: any = {}) {
super(owner, scene, tick, propertyBag);
}
// Creates a prefab at the given path.
// If a prefab already exists it asks if you want to replace it
using UnityEngine;
using UnityEditor;
public class CreateNewPrefab : EditorWindow
{
[MenuItem("Prefab/Create New Prefab")]
static void CreatePrefab()