Skip to content

Instantly share code, notes, and snippets.

View richorama's full-sized avatar
💭
:octocat: 👾 🔥 ☁️

Richard Astbury richorama

💭
:octocat: 👾 🔥 ☁️
View GitHub Profile
@richorama
richorama / index.html
Last active July 26, 2017 09:18
Programmatically determine your nearest Windows Azure Data Centre
<html>
<head>
<script>
var locations = {
"speedtestwe": "West Europe",
"speedtestsea" : "Southeast Asia",
"speedtestea": "East Asia",
"speedtestnsus": "North Central US",
"speedtestne": "North Europe",
"speedtestscus": "South Central US",
@richorama
richorama / index.htm
Created January 7, 2013 16:15
Drop this file into a *public* Windows Azure Blob Storage Container, and open the page in your browser. It will display a list of the blobs for you.
<html>
<head>
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://jquery-xml2json-plugin.googlecode.com/svn/trunk/jquery.xml2json.js"></script>
<script src="http://cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.rc.1.js"></script>
</head>
<body>
<script>
$(document).ready(function() {
@richorama
richorama / gist:3690582
Created September 10, 2012 12:10
Writing to a Windows Azure Storage Queue from Mobile Services
var request = require('request');
var crypto = require('crypto');
var url = require('url');
function insert(item, user, request) {
put_message(account, 'queuename', item.text);
request.execute();
}
var account = {
@richorama
richorama / gist:2923167
Created June 13, 2012 09:59
Simple class to create and write to performance counters
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace Two10.Utils
{
public class PerformanceMonitor : IDisposable
{
string counterCategory = null;