Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher MANEU cmaneu

View GitHub Profile
@cmaneu
cmaneu / slackWeather.js
Last active Mar 17, 2021
Slack slackbot send weather forecast
View slackWeather.js
var request = require("request");
// The Cities IDs can be found on openweathermap.org (make a search, and look the URI)
var cities = [2988507, 5391959];
var slackBotUri = ""; // TODO: Complete
request("http://api.openweathermap.org/data/2.5/group?id="+cities.join(',')+"&units=metric ", function(error, response, body) {
// Maybe we can handle this differently/better ?
if(error != null)
return;
@cmaneu
cmaneu / Function1.cs
Created Dec 23, 2020
SQL Serverless Data Generation
View Function1.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Bogus;
using Dapper;
using Microsoft.AspNetCore.Mvc;
View data-rooms.csv
RoomId RoomName BuildingName
1 A101 - Lobby Main Building
2 A102 - Storage Room Main Building
3 A103 - Cafeteria Main Building
4 A201 - Cafeteria Main Building
5 A202 - Office Main Building
6 A203 - Office Main Building
7 A301 - Cafeteria Main Building
8 A302 - Conference room Main Building
9 B101 - Lobby Grace Hopper Building
@cmaneu
cmaneu / readme.md
Last active Dec 3, 2020
Tools for rapid prototyping
@cmaneu
cmaneu / deploy.sh
Last active Nov 25, 2020
Azure Synapse IoT Workshop
View deploy.sh
printf "\n*** AZURE IOT & SYNAPSE Workshop Creation on Subscription #$SUBSCRIPTION_ID ***\n"
SUBSCRIPTION_ID=`az account show --query id --output tsv`
MAIN_REGION=westeurope
printf "\n*** Working on on Subscription #$SUBSCRIPTION_ID and region $MAIN_REGION***\n"
read -p 'New resource group name: ' RESOURCE_GROUP_NAME
read -p 'Unique prefix (applied to all resources): ' RESOURCE_PREFIX
STORAGE_ACCOUNT_NAME="$RESOURCE_PREFIX"rawstor
@cmaneu
cmaneu / readme.md
Last active Nov 19, 2020
CloudNord 2020 - Scuba Resilience
View readme.md
@cmaneu
cmaneu / Test.md
Last active Nov 12, 2020
Test redirection
View Test.md
View deploy.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceNameSuffix": {
"defaultValue": "deployment",
"type": "String"
}
},
"variables": {
@cmaneu
cmaneu / 0-readme.md
Last active Mar 11, 2019
Station F Containers Demo
View 0-readme.md

Station F - 1001 lives of containers in the cloud

This gist contains my demo script for "1001 lives of containers in the cloud" tech conference.

Demos

  1. Hello Docker
  • Run a simple container
  • Run an Ubuntu Bash
@cmaneu
cmaneu / cheat.md
Last active Mar 7, 2019
MsDevRoadshow - cheat sheet
View cheat.md

main.js - line 57

        scope.rgbColor.g = data.desired.rgbLEDG || 0;
        scope.rgbColor.b = data.desired.rgbLEDB || 0;

State.cs - end of file

        static async Task UpdateRgbLedColor(string state, Microsoft.Azure.Devices.Shared.Twin twin)
        {
            var color = Regex.Split(state, ",");