Skip to content

Instantly share code, notes, and snippets.

View danvanderboom's full-sized avatar

Dan Vanderboom danvanderboom

View GitHub Profile
create database YAMS
use YAMS
-- stores versioned service packages
-- each version of a package can be used in multiple clusters and node types
create table dbo.ServicePackages
danvanderboom /
Last active March 18, 2016 03:33
Box-Muller normal distribution random number generator (Google App Script)
function randnormal(minimum, mean, maximum, stdev)
// start with two uniformly distributed random numbers
var rn1 = Math.random();
var rn2 = Math.random();
// Box-Muller transform
var r = Math.sqrt(-2 * Math.log(rn1));
var theta = 2 * Math.PI * rn2;
var x = r * Math.cos(theta); // 1st of 2 random numbers generated
using System;
using System.Threading.Tasks;
using Xamarin.Forms;
public static class ViewExtensions
public static void ShiftColorTo (this VisualElement view, Color sourceColor, Color targetColor, Action<Color> setter, uint length = 250, Easing easing = null)
view.Animate ("ShiftColorTo",
x =>
danvanderboom / gist:03c2f4b7e26a6fb72509
Created August 22, 2014 21:34
Xamarin.Forms.ContentButton example usage
<local:ContentButton x:Name="DetailButton" WidthRequest="100" HeightRequest="60" BackgroundColor="Blue">
<StackLayout HorizontalOptions="Center" VerticalOptions="CenterAndExpand">
<Label Text="Hello" TextColor="White" Font="16"/>
<Label Text="World" TextColor="White" Font="16"/>