This file contains hidden or 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.Security.Cryptography; | |
| using System.Text; | |
| internal class Program | |
| { | |
| private static void Main(string[] args) | |
| { | |
| var email = "[email protected]"; | |
| var hashed = Hash(email); |
This file contains hidden or 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 MartenProjectionEx<T> : IProjection where T : class, new() | |
| { | |
| private readonly IAggregationFinder<T> _finder; | |
| private readonly IAggregator<T> _aggregator; | |
| private readonly Dictionary<Type, Func<object, Guid>> _relatedEvents = new Dictionary<Type, Func<object, Guid>>(); | |
| private readonly ProjectionOptions _options; | |
| public MartenProjectionEx(IAggregationFinder<T> finder, IAggregator<T> aggregator, ProjectionOptions options) | |
| { |
This file contains hidden or 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
| # Regenerate certs | |
| docker-machine -D regenerate-certs default | |
| # Attach to running container | |
| docker exec -it container_name bash | |
This file contains hidden or 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
| ko.bindingHandlers.tagsinput = { | |
| init: function(element, valueAccessor, allBindings) { | |
| var options = allBindings().tagsinputOptions || {}; | |
| var value = valueAccessor(); | |
| var valueUnwrapped = ko.unwrap(value); | |
| var el = $(element); | |
| el.tagsinput(options); | |
This file contains hidden or 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 Newtonsoft.Json.Serialization; | |
| public class SnakeCasePropertyNamesContractResolver : DefaultContractResolver | |
| { | |
| protected override string ResolvePropertyName(string propertyName) | |
| { | |
| for (int i = propertyName.Length - 1; i > 1; i--) | |
| { | |
| if (char.IsUpper(propertyName[i])) | |
| { |
This file contains hidden or 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
| [user] | |
| name = First Last | |
| email = [email protected] | |
| [core] | |
| symlinks = false | |
| autocrlf = true | |
| [color] | |
| diff = auto | |
| status = auto | |
| branch = auto |
This file contains hidden or 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
| description "nginx http daemon" | |
| start on runlevel [2] | |
| stop on runlevel [016] | |
| console owner | |
| exec /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -g "daemon off;" | |
| respawn |