Skip to content

Instantly share code, notes, and snippets.

View channeladam's full-sized avatar

Adam channeladam

View GitHub Profile
@jenol
jenol / ApplySchemaVendorExtensions.cs
Last active August 21, 2019 17:43
x-nullable for Swashbuckle
public class ApplySchemaVendorExtensions : ISchemaFilter
{
public void Apply(Schema schema, SchemaRegistry schemaRegistry, Type type)
{
if (type.IsArray && type.GetElementType() != typeof(byte))
{
// Special case
return;
}
@tomasaschan
tomasaschan / aks-restart-nodes.sh
Last active August 30, 2022 17:45
Rolling restart of all nodes in an AKS cluster
#!/bin/bash
set -e
resourceGroupDefault='<set your default here, to avoid having to specify in the common case>'
resourceGroup=${RESOURCE_GROUP:-$resourceGroupDefault}
clusterNameDefault='<set your default here>'
clusterName=${CLUSTER_NAME:-$clusterNameDefault}
regionDefault='<set your default here>'
region=${REGION:-$regionDefault}
@mattdesl
mattdesl / cli.js
Created September 13, 2022 10:37
colour palette from text prompt using Stable Diffusion https://twitter.com/mattdesl/status/1569457645182152705
/**
* General-purpose NodeJS CLI/API wrapping the Stable-Diffusion python scripts.
*
* Note that this uses an older fork of stable-diffusion
* with the 'txt2img.py' script, and that script was modified to
* support the --outfile command.
*/
var { spawn, exec } = require("child_process");
var path = require("path");
@Sentdex
Sentdex / multi_image_stablediff_video.py
Created September 16, 2022 01:39
example for making stable diffusion video w/ interpolation
from stable_diffusion_videos.stable_diffusion_walk import walk
prompt_n_seed = {
"1965 Porsche 911": 743,
"1975 Porsche 911": 140,
"1985 Porsche 911": 40,
"1995 Porsche 911": 560,
"2005 Porsche 911 directly facing camera": 996,
"2015 Porsche 911": 283,
"2020 Porsche 911": 116,