Skip to content

Instantly share code, notes, and snippets.

View SetPrereleaseVersionInProjectJson.ps1
# Changes the existing project.json "version" into a prerelease string for a given branch
# name and build number. Prerelease strings are truncated to < 20 characters to work within
# NuGet length restrictions. Non-alphanumeric characters are sanitized from the branch name.
# Accommodates build numbers up to 5 digits.
#
# Examples:
#
# Version: 1.5.0
# Branch: Foo
# BuildNumber: 123
@robhruska
robhruska / UserMigrationState.cs
Created October 23, 2015 20:18
UserMigrationState.cs
View UserMigrationState.cs
/*
The MIT License (MIT)
Copyright (c) 2015 Agile Sports Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@robhruska
robhruska / MigrationResolver.cs
Created October 23, 2015 20:17
MigrationResolver.cs
View MigrationResolver.cs
/*
The MIT License (MIT)
Copyright (c) 2015 Agile Sports Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@robhruska
robhruska / HybridUserLookupDomain.cs
Created October 23, 2015 20:17
HybridUserLookupDomain.cs
View HybridUserLookupDomain.cs
/*
The MIT License (MIT)
Copyright (c) 2015 Agile Sports Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@robhruska
robhruska / UserMigrationJob.cs
Created October 23, 2015 20:16
UserMigrationJob.cs
View UserMigrationJob.cs
/*
The MIT License (MIT)
Copyright (c) 2015 Agile Sports Technologies, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@robhruska
robhruska / Mp4InterleaveJob.cs
Last active August 29, 2015 14:09
Mp4InterleaveJob.cs
View Mp4InterleaveJob.cs
[DataContract]
public class Mp4InterleaveJob : BaseEncodeJob
{
[DataMember] public S3File InputFile { get; set; }
[DataMember] public S3OutputFile OutputFile { get; set; }
[DataMember] public byte MediaQuality { get; set; }
}
@robhruska
robhruska / MapMerge.groovy
Created January 23, 2013 19:55
Merge nested maps together
View MapMerge.groovy
class MapMerge {
/**
* Deeply merges the contents of each Map in sources, merging from
* "right to left" and returning the merged Map.
*
* Mimics 'extend()' functions often seen in JavaScript libraries.
* Any specific Map implementations (e.g. TreeMap, LinkedHashMap)
* are not guaranteed to be retained. The ordering of the keys in