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; | |
| using Newtonsoft.Json.Serialization; | |
| public class OrderedContractResolver : DefaultContractResolver { | |
| protected override System.Collections.Generic.IList<JsonProperty> CreateProperties(System.Type type, MemberSerialization memberSerialization) { | |
| return base.CreateProperties(type, memberSerialization).OrderBy(p => p.PropertyName).ToList(); | |
| } | |
| } |
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; | |
| using System.Data; | |
| using NHibernate.SqlTypes; | |
| using NHibernate.Util; | |
| namespace NHibernate.UserTypes | |
| { | |
| public class UnixTimeType : IUserType | |
| { | |
| public System.Type ReturnedType => typeof(DateTimeOffset); |
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
| import java.io.*; | |
| import java.net.*; | |
| public class JGet { | |
| public static void main(String[] args) { | |
| if ( (args.length == 0) ){ | |
| System.err.println( "\nUsage: java HttpGet [urlToGet]" ); | |
| System.exit(1); | |
| } | |
| String url = args[0]; |
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
| #!/usr/bin/env groovy | |
| if (!this.args.length){ | |
| scriptName = getClass().protectionDomain.codeSource.location.path.split('/')[-1] | |
| throw new RuntimeException( "Usage: groovy ${scriptName} [urlToGet]" ) | |
| } | |
| println new URL(this.args[0]).text |
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
| #!/bin/bash | |
| if [ "$1" == "" ]; then | |
| echo "Usage: $0 [src db] [dest db]" | |
| exit 0 | |
| else | |
| srcdb="$1" | |
| fi | |
| if [ "$2" == "" ]; then | |
| destdb="1" | |
| else |
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.Collections.Generic; | |
| using System.Web.Http; | |
| using System.Web.Http.Routing; | |
| namespace System.Net.Http { | |
| /// <summary> | |
| /// OData PageLink Header Builder | |
| /// </summary> | |
| //http://www.jerriepelser.com/blog/paging-in-aspnet-webapi-pagination-links | |
| public class ODataPageLinkBuilder { |
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.Collections.Generic; | |
| using System.Linq; | |
| using System.Net.Http; | |
| using System.Net.Http.Headers; | |
| namespace System.Web.Http { | |
| /// <summary> | |
| /// Extends the HttpRequestMessage collection | |
| /// </summary> | |
| /// <remarks>http://weblog.west-wind.com/posts/2013/Apr/15/WebAPI-Getting-Headers-QueryString-and-Cookie-Values</remarks> | |
| public static class HttpRequestMessageExtensions { |
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
| new Date(parseInt('/Date(1436323325308)/'.substr(6,13),10)) |
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.Collections.Generic; | |
| namespace System.Net.Http | |
| { | |
| public static class HttpResponseExtensions | |
| { | |
| /// <summary> | |
| /// clone Cookies from Response to Request | |
| /// </summary> | |
| /// <param name="response"></param> |
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
| { | |
| // https://github.com/NLog/NLog.Extensions.Logging/wiki/NLog-configuration-with-appsettings.json | |
| "NLog": { | |
| "autoReload": true, | |
| "throwConfigExceptions": true, | |
| "extensions": [ | |
| { | |
| "assembly": "NLog.Extensions.Logging" | |
| }, | |
| { |
OlderNewer