These are snippets I use to find text in specific types of files.
.css;.scss;!*.min.css
@page "/robots.txt" | |
@{ | |
Layout = null; | |
Response.ContentType = "text/plain"; | |
} | |
@using Microsoft.AspNetCore.Hosting | |
@inject IHostingEnvironment env | |
User-agent: * | |
@if (env.IsProduction()) | |
{ |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: helm-controller | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: helm-controller |
(function ($) { | |
// Make ASP's unobtrusive validation compatible with Bootstrap 5 styling. See this for more details: https://stackoverflow.com/a/19006517/576153 | |
$.validator.setDefaults({ | |
errorElement: "span", | |
errorClass: "invalid-feedback", | |
highlight: function (element, errorClass, validClass) { | |
// Only validation controls | |
if (!$(element).hasClass('novalidation')) { | |
$(element).closest('.form-control').removeClass('is-valid').addClass('is-invalid'); | |
} |
This gist describes how to add Kubernetes customDismensions to the Java agent for Application Insights.
It's supplying the same customDimensions that are provided by the asp.net 6+ instrumentiation, except that not all of those dimensions are available using the Kubernetes Downward API
The supplied app-insights-java.yaml patch file configures customDimensions for the app insights agent using the APPLICATIONINSIGHTS_CONFIGURATION_CONTENT
env var.
This will override your applicationinsights.json configuration file if you were using one.
// This script highlights touchable elements on the page that are either too small or too close together according to Google. | |
// https://support.google.com/webmasters/answer/9063469#touch_elements_too_close | |
const MinimumSize = 48; | |
const MinimumMargin = 8; | |
let clickableNodesList = document.querySelectorAll('a,button'); | |
for (let ia = 0; ia < clickableNodesList.length; ia++){ | |
let aElement = clickableNodesList[ia]; | |
let aBound = aElement.getBoundingClientRect(); |
echo "setting alias clip-branch to copy the current git branch to the Windows clipboard" | |
echo "alias clip-branch='git rev-parse --abbrev-ref HEAD | tr -d '\n' | clip.exe'" |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Newtonsoft.Json.Serialization; | |
namespace MyNewtonsoftExtensions | |
{ | |
public class ReferenceResolverWithNames : IReferenceResolver | |
{ | |
private readonly ReferenceCollection _collection = new ReferenceCollection(); |