This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#powershell script port of https://github.com/maxhauser/semver/ | |
function toSemVer($version){ | |
$version -match "^(?<major>\d+)(\.(?<minor>\d+))?(\.(?<patch>\d+))?(\-(?<pre>[0-9A-Za-z\-\.]+))?(\+(?<build>[0-9A-Za-z\-\.]+))?$" | Out-Null | |
$major = [int]$matches['major'] | |
$minor = [int]$matches['minor'] | |
$patch = [int]$matches['patch'] | |
if($matches['pre'] -eq $null){$pre = @()} | |
else{$pre = $matches['pre'].Split(".")} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GuidGenerator | |
{ | |
public static Guid CreateGuidFromName(Guid @namespace, string name) | |
{ | |
return CreateGuidFromName(@namespace, name, 5); | |
} | |
//Implements rfc 4122 | |
public static Guid CreateGuidFromName(Guid @namespace, string name, int version) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Newtonsoft.Json.Linq; | |
namespace ConsoleApplication3 { | |
class Program { | |
static void Main(string[] args) { | |
Random rnd = new Random(); | |
var names = new[] {"James", "Greg", "Tomas", "Rob", "Matias", "Roberto", "Ronan"}; | |
var text = new[] {"Hi","herpy", "derpy", "herpherp", "derpderp", "chocolate", "moose", "put the moose in the chocolate", "ponies", "starbucks", "happy"}; | |
JArray events = new JArray(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"eventId": "0851995c-8a68-42cf-8035-c7976e07de48", | |
"eventType": "ChatMessage", | |
"data": { | |
"sender": "Greg", | |
"message": "Hi", | |
"time": "03:45:30" | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"eventId": "954d8152-a9e8-4bfc-be7b-1c637900a853", | |
"eventType": "ChatMessage", | |
"data": { | |
"sender": "Rob", | |
"message": "starbucks", | |
"time": "03:45:30" | |
} | |
}, |