Skip to content

Instantly share code, notes, and snippets.

View markwhitaker's full-sized avatar

Mark Whitaker markwhitaker

View GitHub Profile
@markwhitaker
markwhitaker / JSON-minified-Groovy.json.groovy
Last active November 3, 2021 14:43
DataGrip extractor to extract minified JSON with null values omitted
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
@markwhitaker
markwhitaker / MimeTypes.java
Last active August 17, 2021 10:21
Standard MIME type constants ready to use in a Java project. Now a library: see https://github.com/markwhitaker/MimeTypes.Java
public final class MimeTypes
{
public static final class Application
{
public static final String ATOM_XML = "application/atom+xml";
public static final String ATOMCAT_XML = "application/atomcat+xml";
public static final String ECMASCRIPT = "application/ecmascript";
public static final String JAVA_ARCHIVE = "application/java-archive";
public static final String JAVASCRIPT = "application/javascript";
public static final String JSON = "application/json";
@markwhitaker
markwhitaker / MimeTypes.cs
Last active December 29, 2023 16:42
Standard MIME type constants ready to use in a C# project. Now a NuGet package: see https://github.com/markwhitaker/MimeTypes.NET
public static class MimeTypes
{
public static class Application
{
public const string AtomXml = "application/atom+xml";
public const string AtomcatXml = "application/atomcat+xml";
public const string Ecmascript = "application/ecmascript";
public const string JavaArchive = "application/java-archive";
public const string Javascript = "application/javascript";
public const string Json = "application/json";