Skip to content

Instantly share code, notes, and snippets.

View gbaeke's full-sized avatar

Geert Baeke gbaeke

View GitHub Profile
var builder = require('botbuilder');
var airq = require('./airq');
var restify = require('restify');
// Setup Restify Server
var server = restify.createServer();
server.listen(process.env.port || process.env.PORT || 3978, function () {
console.log('%s listening to %s', server.name, server.url);
});
@gbaeke
gbaeke / shippable-webtask.js
Created December 22, 2016 18:27
A Slash WebTask for Slack to run a build on Shippable
var request=require('request');
module.exports = function (ctx, cb) {
var shippable_secret=ctx.secrets.shippable; // API token for shippable API
var project=ctx.body.text; // project name passed as parameter to Slash command
// do not want to look up the project id in code; create dictionary here
var projects={
realtime: '<Shippable project id>'
int LED = D1;
int PR = A0; // photoresistor port
int BUTTON = D0; // button port
bool bright;
bool pressed;
bool playing;
int brightness = 0; // to store the current brightness
// Sonos stuff grabbed from Hover_particle
// This #include statement was automatically added by the Particle IDE.
#include "Temboo/Temboo.h"
#include "TembooAccount.h"
int LED = D1;
int PR = A0; // photoresistor port
int BUTTON = D0; // button port
bool bright;
bool pressed;
// Code requires a Sonos control API from https://github.com/jishi/node-sonos-http-api at
// SonosController IP address and port defined in request.port
// include HttpClient library in your Build project
#include "application.h"
#include "HttpClient/HttpClient.h"
int LED=D1;
int BUTTON = D0;
bool pressed;
@gbaeke
gbaeke / IoTAppDeployment.json
Created April 18, 2017 13:38
Azure Resource Manager template that deploys an IoT Hub, Storage Account, Function App, Dynamic web plan with Function App
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"iotHubName": {
"type": "string",
"metadata": {
"description": "Name of the IoT Hub"
}
},
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NBitcoin;
using QBitNinja.Client;
using QBitNinja.Client.Models;
namespace ConsoleApplication1
0xd263b5346f7e6b4b9b7983366be56468982594f0
@gbaeke
gbaeke / run.py
Last active December 30, 2018 21:04
Python script to perform inference with an Azure Machine Learning scoring container for ResNet50v2
import keras
from keras.applications.resnet50 import ResNet50
from keras.applications.resnet50 import decode_predictions
from keras.preprocessing import image
from keras.applications.resnet50 import preprocess_input
from keras.preprocessing import image as image_utils
import numpy as np
import requests
import json
@gbaeke
gbaeke / exploring-pulumi.js
Created January 19, 2019 22:24
Deploy storage account, share, container group with Pulumi
"use strict";
const pulumi = require("@pulumi/pulumi");
const azure = require("@pulumi/azure");
// Create an Azure Resource Group
const resourceGroup = new azure.core.ResourceGroup("resourceGroup", {
location: "WestEurope",
name: "aci-rg",
});