Skip to content

Instantly share code, notes, and snippets.

View aimeerivers's full-sized avatar

aimee rivers aimeerivers

View GitHub Profile
@RichardSlater
RichardSlater / FindAndReplaceInAzureBlob.cs
Created November 24, 2012 16:42
Find any string and replace with any other string in an Azure Table Storage Blob
var accountName = Properties.Settings.Default.StorageAccountName;
var accountKey = Properties.Settings.Default.AccessKey;
var containerName = Properties.Settings.Default.ContainerName;
var blobName = Properties.Settings.Default.Blob;
var credentials = new StorageCredentials(accountName, accountKey);
var account = new CloudStorageAccount(credentials, useHttps: true);
var client = account.CreateCloudBlobClient();
var container = client.GetContainerReference(containerName);
@cstrahan
cstrahan / SolarInfo.cs
Created January 6, 2011 05:06
A sunrise/sunset calculator.
using System;
using System.Diagnostics;
namespace SunriseCalculator
{
public class SolarInfo
{
public double SolarDeclination { get; private set; }
public TimeSpan EquationOfTime { get; private set; }
public DateTime Sunrise { get; private set; }
def authors_from_commit(commit)
authors = []
commit.chomp.split(' and ').map{|a| authors.push a}
authors
end
def authors_from_commits(commits)
authors = []
commits.each do |commit|
authors += authors_from_commit(commit)