Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Andreas Moelgaard pmoelgaard

View GitHub Profile
View OID_DIRECTORIES:agilis
{
"1": {
"@name": "iso",
"@oid": "1",
"Description": "International Organization for Standardization (ISO)"
},
"1.3": {
"@name": "identified-organization",
"@oid": "1.3",
"Description": "Organization identification schemes registered according to ISO/IEC 6523-2"
View AGILIS_PROD:AGILIS-PROD-INTEGRATED-BUC-MIB
{
"nodes": {
"1": {
"@oid": "1",
"element": {
"@name": "iso",
"@oid": "1",
"Description": "International Organization for Standardization (ISO)"
},
"nodes": {
View nx-ui-model-parser.ts
/// <reference path="../../typings/tsd.d.ts" />
/// <reference path="../tsd.d.ts" />
module nx.ui.modelParser {
var $module:ng.IModule = angular.module('nx.ui');
export interface IModelParserScope extends ng.IScope {
View nx-ui-model-formatter.ts
/// <reference path="../../typings/tsd.d.ts" />
/// <reference path="../tsd.d.ts" />
module nx.ui.modelFormatter {
var $module:ng.IModule = angular.module('nx.ui');
export interface IModelFormatterScope extends ng.IScope {
View loopback-hooks-boot.ts
/// <reference path='../../typings/tsd.d.ts' />
/// <reference path='../../typings/main.d.ts' />
/// <reference path='../tsd.d.ts' />
import path = require('path');
import async = require('async');
import glob = require("glob");
import _ = require("lodash");
import hooks = require("../loopback-hooks/loopback-hooks");
@pmoelgaard
pmoelgaard / hooks.ts
Created Feb 21, 2016
Hook Harvester - Early Version
View hooks.ts
/// <reference path='../../typings/tsd.d.ts' />
import path = require('path');
import async = require('async');
function ModuleDef(server:any, next:Function):void {
var glob:any = require("glob");
glob('local_modules/**/hooks/**/*.js', function (err:Error, hooks:Array<string>):void {
@pmoelgaard
pmoelgaard / random.ts
Created Oct 26, 2015
Random MySQL Mixin for Loopback
View random.ts
/// <reference path='../../typings/tsd.d.ts' />
/// <reference path='../../local_modules/tsd.d.ts' />
import path = require('path');
import async = require('async');
import _ = require('lodash');
import IRemoteMethodCallbackFunction = loopback.IRemoteMethodCallbackFunction;
import IMySQLTableDefinition = loopback.IMySQLTableDefinition;
import IPersistenceModelItem = loopback.IPersistenceModelItem;
View MainView.ux
<App Theme="Basic">
<JavaScript File="fuse-resource/fuse-resource.js" ux:Global="fuseResource" />
<DockPanel>
<JavaScript>
var Observable = require("FuseJS/Observable");
View designer.html
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="bbb-songkran2015">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@pmoelgaard
pmoelgaard / boot.whoami.js
Last active Oct 26, 2015
Simple WhoAmI for Loopback
View boot.whoami.js
module.exports = function (server) {
var router = server.loopback.Router();
router.get('/whoami', function (req, res) {
var AccessToken = server.models.AccessToken;
AccessToken.findForRequest(req, {}, function (aux, accesstoken) {
if (accesstoken == undefined) {
res.status(401);
You can’t perform that action at this time.