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 static class KeyValuePairExtension | |
{ | |
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> source, out TKey Key, out TValue Value) | |
{ | |
Key = source.Key; | |
Value = source.Value; | |
} | |
} |
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
<template> | |
<div> | |
<slot></slot> | |
</div> | |
</template> | |
<script> | |
import Vue from 'vue' | |
export default { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.webServer> | |
<staticContent> | |
<clientCache cacheControlMode="UseExpires" httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" /> | |
<mimeMap fileExtension=".js.gz" mimeType="application/javascript" /> | |
</staticContent> | |
</system.webServer> | |
<location path="gz"> | |
<system.webServer> |
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
# encoding: utf-8 | |
# FastCGI-to-WSGI bridge for files/pipes transport (not socket) | |
# | |
# Copyright (c) 2002, 2003, 2005, 2006 Allan Saddi <allan@saddi.com> | |
# Copyright (c) 2011 Ruslan Keba <ruslan@helicontech.com> | |
# Copyright (c) 2012 Antoine Martin <antoine@openance.com> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without |
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
<%@ Page Language="C#" AutoEventWireup="true" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title>ASP.NET WebForms Validators & Bootstrap</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css" /> |
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
worker_processes 1; | |
error_log /usr/local/var/log/nginx.error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; |
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
class Query | |
undef select | |
def method_missing(id, &block) | |
if block | |
instance_variable_set("@#{id}", block) | |
else | |
instance_variable_get("@#{id}") | |
end | |
end | |
end |
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 IQueryableExtensions | |
{ | |
private static readonly TypeInfo QueryCompilerTypeInfo = typeof(QueryCompiler).GetTypeInfo(); | |
private static readonly FieldInfo QueryCompilerField = typeof(EntityQueryProvider).GetTypeInfo().DeclaredFields.First(x => x.Name == "_queryCompiler"); | |
private static readonly PropertyInfo NodeTypeProviderField = QueryCompilerTypeInfo.DeclaredProperties.Single(x => x.Name == "NodeTypeProvider"); | |
private static readonly MethodInfo CreateQueryParserMethod = QueryCompilerTypeInfo.DeclaredMethods.First(x => x.Name == "CreateQueryParser"); |
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.Drawing; | |
const int size = 150; | |
const int quality = 75; | |
using (var image = new Bitmap(System.Drawing.Image.FromFile(inputPath))) | |
{ | |
int width, height; | |
if (image.Width > image.Height) | |
{ |
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.Collections.Generic; | |
using System.Web.Http.Description; | |
using Swashbuckle.Swagger; | |
namespace BoundedContext.Web.Swagger | |
{ | |
public class LowercaseDocumentFilter : IDocumentFilter | |
{ | |
public void Apply(SwaggerDocument swaggerDoc, SchemaRegistry schemaRegistry, IApiExplorer apiExplorer) | |
{ |
NewerOlder