Skip to content

Instantly share code, notes, and snippets.

View MagnusThor's full-sized avatar
🏠
Working from home

Magnus 'Bagzy' Thor MagnusThor

🏠
Working from home
  • Freelancer & member of coloquium
  • Sweden
View GitHub Profile
verticles = [
new Noc.Point3D(-1, -1, -1), // 0
new Noc.Point3D(1, -1, -1), // 1
new Noc.Point3D(1, 1, -1), // 2
new Noc.Point3D(-1, 1, -1), // 3
new Noc.Point3D(1, -1, 1, 0), // 5
new Noc.Point3D(1, 1, 1), // 6
new Noc.Point3D(-1, 1, 1), // 7
];
var faces = [
@MagnusThor
MagnusThor / aconfig.js
Created December 14, 2015 15:08
Pass a object , that you can grab from the c# controller using .GetParameter("foo") ...
var myParams = {
foo: "bar",
categoryId :1001
};
xsocketsControllerProvider.open("ws://" + location.host, myParams);
...
return {
restrict: 'E',
scope: {
options: '=options', // arr med data?
// [{label: '' , value: 0 },... ]
select: '&onSelect',
trigger: '=trigger',
labelField: '=labelField', // label
<div class="input-group-btn">
<ul class="dropdown-menu">
<li ng-repeat="option in options">
<a ng-click="select({item:option})"
ng-class="{'current': $index === currentIndex }">
{{option.Name}}
</a>
</li>
</ul>
@MagnusThor
MagnusThor / sym-dir-impl.html
Created December 10, 2015 08:56
sym-dir-impl.html
<input type="text" ng-keyup="find($event)" id="auto" class="form-control"/>
<sym-suggestions options="results"
on-select="selectedItem(item)" trigger="auto">
</sym-suggestions>
@MagnusThor
MagnusThor / sym-dir-tmpl.html
Created December 10, 2015 08:56
sym-dir-tmpl.html
<ul class="sym-suggestions">
<li ng-repeat="option in options">
<span ng-click="select({item:option})" >
{{option.Name}}
</span>
</li>
</ul>
@MagnusThor
MagnusThor / sym-dir.js
Created December 10, 2015 08:55
symSug
angular.module("auctionApp").directive("symSuggestions", function ($compile) {
return {
restrict: 'E',
scope: {
options: '=options',
select: '&onSelect',
trigger: '=trigger',
// transclude: true
@MagnusThor
MagnusThor / Donkey
Created November 27, 2015 11:04
Just a thing
angular.module("myApp").factory("await", [
function() {
this.awaits = {};
this.await = function (what, fn) {
this.awaits[what] = fn;
return this;
};
this.fire = function (what, data) {
if (this.awaits.hasOwnProperty(what)) {
this.awaits[what].apply(this,[data]);
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Custom Geo Binder</title>
</head>
<body>
<div id="app">
scenes.forEach(function (scene) {
scene.entity.push = scene.start;
engine.addEntity(scene.entity);
});