Skip to content

Instantly share code, notes, and snippets.

View build.yml
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build packages
on:
push:
branches: [main, develop]
jobs:
build_package:
View woddle.md

Woddle user guide

“I found a new workout I want to note down for later”

  1. Go to “Workouts”
  2. Add a new workout (+)
  3. Categorise the workout based on where it came from (optional)
  4. Add the movements within the workout (optional, helps with filtering)

> “I found a new workout I want to do now”

View index.js
const express = require("express");
const { postgraphile } = require("postgraphile");
const PostGraphileNestedMutations = require("postgraphile-plugin-nested-mutations");
const SimplifyInflectorPlugin = require("@graphile-contrib/pg-simplify-inflector");
const app = express();
app.use(
postgraphile(process.env.DATABASE_URL, "public", {
watchPg: true,
View notworking.graphql
mutation {
updateQuote(
input: {
patch: {
quoteDaysUsingId: {
updateById: {
patch: { propertyToPropertyId: { connectById: { id: 1 } } }
id: 1
}
}
View DisableIntrospection.ts
import { PostGraphilePlugin } from "postgraphile";
import * as graphql from "graphql";
const DisableIntrospection: PostGraphilePlugin = {
["postgraphile:validationRules:static"](args, _context) {
if (process.env.ALLOW_INTROSPECTION) {
return [args];
}
return [
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();