Skip to content

Instantly share code, notes, and snippets.

View tomconte's full-sized avatar
💻
Working from home

Thomas Conté tomconte

💻
Working from home
View GitHub Profile
# Parameters
#$publishSettingFilePath = "C:\Users\tconte\Downloads\Hermes-Recette-11-21-2013-credentials.publishsettings"
$publishSettingFilePath = "C:\Users\tconte\Downloads\Windows Azure BizSpark 1111-JeromeSAS-4-19-2013-credentials.publishsettings"
#$subscriptionName = "Hermes-Recette"
$subscriptionName = "Windows Azure BizSpark 1111"
$outfiledisks="C:\dev\result_disks.txt"
$outfilefiles="C:\dev\results_files.txt"
$outfilenetworks="C:\dev\results_network.txt"
$outfileendpoints="C:\dev\results_endpoints.txt"
$outfilevms="C:\dev\results_vms.txt"
@tomconte
tomconte / GetWikiStats.ps1
Created July 9, 2014 06:43
Complete sample scripts for the article "Analyzing page view logs using Pig on Windows Azure HDInsight"
$wc=New-Object System.Net.WebClient
foreach ($i in 0..23) {
$n = "{0:D2}" -f $i
echo $n
$url = "http://dumps.wikimedia.org/other/pagecounts-raw/2013/2013-04/pagecounts-20130401-" + $n + "0000.gz"
$wc.DownloadFile($url, $url.SubString($url.LastIndexOf("/")+1))
}
@tomconte
tomconte / EsploraSensors.ino
Created July 12, 2014 12:50
Read various sensor values from an Esplora board and print them to serial port.
/*
** Read various sensor values and print them to serial port.
**
** Thomas Conté @tomconte
*/
#include <Esplora.h>
int lightMin = 1023; // minimum sensor value
int lightMax = 0; // maximum sensor value
/*
** This sample Arduino sketch uploads telemetry data to Azure Mobile Services on an Arduino Yun
** The Bridge library is used to run cURL to send the data securely using SSL.
** See the full article here: http://hypernephelist.com/2014/08/19/https_on_arduino_yun.html
**
** Thomas Conté @tomconte
*/
#include <Process.h>
#!/usr/bin/python
import sys
import commands
import re
import uuid
import serial
from proton import *
# Device ID
@tomconte
tomconte / HueSwitchButton.ino
Created December 14, 2014 11:44
This little sketch allows to turn Hue lamps on or off using a push button.
#include <Bridge.h>
#include <Console.h>
#include <FileIO.h>
#include <HttpClient.h>
#include <Mailbox.h>
#include <Process.h>
#include <YunClient.h>
#include <YunServer.h>
/*
@tomconte
tomconte / upload_to_blobs.py
Last active September 25, 2015 12:38
Uploads a directory tree to Windows Azure Blob Storage
#!/usr/bin/env python
import os
import sys
import mimetypes
from azure.storage import BlobService
BLOB_ACCOUNT = "foo"
BLOB_KEY = "bar"
DEST_CONTAINER = "test"
@tomconte
tomconte / wp2tumblr.py
Created April 16, 2011 16:18
WordPress to Tumblr migration
#!/usr/bin/env python
"""
wp2tumblr.py
Python script for migrating your Wordpress blog to Tumblr
Karteek Edamadaka
Modified by Thomas Conte for his own needs
"""
import os
import sys
@tomconte
tomconte / Program.cs
Created August 10, 2011 16:28
Sample command-line utility to enable Storage Analytics on Windows Azure
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using Microsoft.WindowsAzure;
using System.IO;
using System.Xml.Linq;
using NDesk.Options;
@tomconte
tomconte / extractwazdashrss.sh
Created October 5, 2012 12:38
Extract Windows Azure Dashboard RSS Feed URLs
curl https://www.windowsazurestatus.com/windowsazure/support/status/servicedashboardcontent.aspx | grep RSSFeedCode | perl -ne '/href=\"(.+)\" target=/; print "https://www.windowsazurestatus.com/windowsazure/support/status/", $1, "\n";' | sort -u