Skip to content

Instantly share code, notes, and snippets.

View recursive-parents.sql
with recursive cte as (
select
child_id,
parent_id,
project_id,
array [child_id, parent_id] as path,
1 as level
from
child_parent
union all
View Pkcs12ProtectedConfigurationProvider.cs
using System;
using System.Collections.Specialized;
using System.Configuration;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Cryptography.Xml;
using System.Xml;
namespace MyApp.Core.Security
{
View crd.yml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: azureingressprohibitedtargets.appgw.ingress.k8s.io
labels:
app: ingress-azure
chart: ingress-azure-1.2.0-rc1
heritage: Helm
release: ingress-azure
spec:
View config.ts
const config: Config = {
fields: {
amount: {
type: "number",
aliases: ["amt", "<implicit>"],
queryField: (exp: any) => ({
ledgerTransactionsByPostingId: {
some: {
amountValue: exp
}
View interfaceq.cs
using System;
namespace Temp
{
class Program
{
static void Main(string[] args)
{
var a = new A();
View test.js
const ifTask = () => {
const color = "";
if (color == "red") {
//do something
} else if (color == "blue") {
//do something
} else if (color == "brown") {
//do something
} else if (color == "black") {
//do something
View .master.check.js
const fs = require("fs");
const { exec } = require("child_process");
// this script aims to ensure that the master branch is never
// merged into another branch and thus will never end up in
// production
// installation:
// 1. yarn add -D husky
// 2. place this file in the root of the repository
View ListFilter.cs
public abstract class ListFilter
{
public string Name { get; set; }
public Type ValueType { get; set; }
public Type ArgumentType { get; set; }
public object DefaultValue { get; set; }
View PatchController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.JsonPatch;
using Microsoft.AspNetCore.JsonPatch.Operations;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json.Linq;
using MyApp.Models;
View webpack.config.js
module.exports = {
mode: process.env.NODE_ENV || "development",
entry: {
main: "./src/js/main.js"
},
output: {
filename: "[name].js"
},
module: {
rules: [
You can’t perform that action at this time.