This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const debug = require("debug")("azureServiceBus"); | |
const events = require("events"); | |
const azure = require("azure"); | |
/* | |
Class wrapper around Azure Service Bus Topic/Subscription API. | |
Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a container from the mongo image, | |
# run is as a daemon (-d), expose the port 27017 (-p), | |
# set it to auto start (--restart) | |
# and with mongo authentication (--auth) | |
# Image used is https://hub.docker.com/_/mongo/ | |
docker pull mongo | |
docker run --name YOURCONTAINERNAME --restart=always -d -p 27017:27017 mongo mongod --auth | |
# Using the mongo "localhost exception" (https://docs.mongodb.org/v3.0/core/security-users/#localhost-exception) | |
# add a root user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": { | |
"@vocab": "http://schema.org/", | |
"myCustomProperty": null, | |
"@base": "https://gist.github.com/davideicardi/94e9f338a11328061e42", | |
"slug": "@id", | |
"type": "@type" | |
}, | |
"slug": "people", | |
"type": "DataFeed", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker run -d \ | |
--name graphite \ | |
--restart=always \ | |
-v /home/webplu/graphite/storage:/opt/graphite/storage \ | |
-v /home/webplu/log:/var/log \ | |
-p 80:80 \ | |
-p 2003:2003 \ | |
-p 8125:8125/udp \ | |
hopsoft/graphite-statsd | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.myClass.ng-enter, .myClass.ng-leave { | |
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 5s; | |
transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 5s; | |
} | |
.myClass.ng-enter, | |
.myClass.ng-leave.ng-leave-active { | |
opacity:0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function denodifyMethod(funcName){ | |
return function(){ | |
return Q.npost(this, funcName, arguments); | |
} | |
} | |
serviceBusService.createTopicIfNotExistsQ = denodifyMethod("createTopicIfNotExists"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function cleanRequireCache(){ | |
Object.keys(require.cache).forEach(function(key) { | |
delete require.cache[key]; | |
}); | |
} | |
function cleanRequire(path){ | |
delete require.cache[require.resolve(path)]; | |
return require(path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage: | |
// <di-three-js-viewer three-js-object="device3DModel"></di-three-js-viewer> | |
app.directive('diThreeJsViewer', [function() { | |
function createThreeJsCanvas(parentElement, object) { | |
var width = 400; | |
var height = 400; | |
var scene = new THREE.Scene(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ErrorActionPreference = "Stop" | |
Set-StrictMode -Version 3.0 | |
<#-------------------------------------------------------------------------- | |
https://gallery.technet.microsoft.com/scriptcenter/The-PowerShell-script-for-2a2456c4 | |
.SYNOPSIS | |
Script for running T-SQL files in MS SQL Server | |
Andy Mishechkin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-AzureWebSitePublishXml | |
{ | |
Param( | |
[Parameter(Mandatory = $true)] | |
[String]$WebsiteName | |
) | |
# Get the current subscription | |
$s = Get-AzureSubscription -Current | |
if (!$s) {throw "Cannot get Windows Azure subscription."} |