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 / Azure Data Centers.geojson
Last active February 12, 2017 12:17
Azure Data Center Locations
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@richorama
richorama / sample.geojson
Created June 17, 2014 10:07
Example geojson file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@richorama
richorama / test.geojson
Last active August 29, 2015 14:02
GeoJson Test
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@richorama
richorama / server.js
Created June 5, 2014 18:40
An HTTP proxy server written in Node.js
var http = require('http');
var url = require('url');
http.createServer(function(request, response) {
console.log(request.url);
var options = url.parse(request.url);
options.method = request.method;
options.headers = request.headers;
var req = http.request(options, function(res){
@richorama
richorama / talk.md
Created February 28, 2014 17:29
Nodejs + LevelDB Talk

Intro into level db

https://code.google.com/p/leveldb/

  • It's a database, it's by google, and is what supports IndexDB in the chrome browser
  • It's also been used to store data in riak
  • It lives in your process (a bit like sqlite)
  • Inspired by Big Table, but designed to work on mobile devices
  • There is great support for leveldb in the node.js
  • Node is a great tool for sticking technologies together
@richorama
richorama / Program.cs
Last active January 4, 2016 14:59
Very simple benchmark to see whether its better to compile .NET for x64 for x86 (x86 is faster)
/*
Very simple benchmark to see whether its better to compile .NET for x64 for x86
Results on my Lenovo X1 Core i5 pro running on high performance mode
Compiled for release x64
999ms
1017ms
1031ms
@richorama
richorama / demo.cs
Created January 7, 2014 12:03
Download files from Visual Studio Online
var netCred = new NetworkCredential("username", "password");
var basicCred = new BasicAuthCredential(netCred);
var tfsCred = new TfsClientCredentials(basicCred);
tfsCred.AllowInteractive = false;
var tfs = new TfsTeamProjectCollection(new Uri("https://XXX.visualstudio.com/DefaultCollection/"), tfsCred);
tfs.Authenticate();
var vcs = tfs.GetService<VersionControlServer>();
@richorama
richorama / package.json
Last active April 8, 2016 14:35
A github service hook to start a VM, and shut it down after 15 minutes of inactivity
{
"name": "vmstartstop",
"version": "0.0.0",
"description": "",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"author": "",
# More information on Python SDK for Windows Azure
# http://www.windowsazure.com/en-us/develop/python/how-to-guides/service-management/
from azure import *
from azure.servicemanagement import *
import time
import base64
subscription_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
certificate_path = 'mycert.pem'
@richorama
richorama / ReportingService2010.cs
Created October 3, 2013 08:39
The proxy for Reporting Service 2010 Web Service
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------