This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private boolean matchesAnyGlob(String value, Collection<String> globs) { | |
// convert globs to regex | |
StringBuilder sb = new StringBuilder(); | |
sb.append("("); | |
for (String glob : globs) { | |
if (sb.length() > 1) { | |
sb.append("|"); | |
} | |
String[] parts = glob.splitWithDelimiters("[*?]", 0); | |
for (int i = 0; i < parts.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$id": "https://drs-concepts.example.com/drs-concepts.schema.json", | |
"$schema": "https://json-schema.org/draft/2020-12/schema", | |
"anyOf": [ | |
{ "$ref": "#/$defs/url" }, | |
{ "$ref": "#/$defs/curie" }, | |
], | |
"$defs": { | |
"url": { | |
"title": "DrsObject URL", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.15 | |
RUN echo "This Docker image exists so you can run the prebuilt memory calculator on MacOS and Windows.\n\ | |
There is no sense in using it on a Linux system.\n\ | |
You can find the Dockerfile at https://gist.github.com/jfuerth/f002f3dde9b54e5be67b43f0a85d59d7" \ | |
> /etc/motd | |
# Grab the pre-compiled release binary | |
RUN wget -O - https://github.com/cloudfoundry/java-buildpack-memory-calculator/releases/download/v4.1.0/memory-calculator-4.1.0.tgz \ | |
| tar zxv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: "3.0.2" | |
paths: | |
/table/{tableName}: | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: "#/components/schemas/Table" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// egl_bar.c - self-contained example of a vertical bar moving across the screen. | |
// compile with gcc -Wall -O0 -g -o egl_bar egl_bar.c log.c -lX11 -lEGL -lGLESv2 -lm | |
#include <stdio.h> | |
#include <math.h> | |
#include <malloc.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sets up Xorg on Raspberry Pi 3b in FKMS mode for two screens. | |
# | |
# To put the Pi into FKMS mode, add one of the following lines to /boot/config.txt: | |
# 1. "fake" KMS mode (exposes the proprietary vc4 firmware driver via KMS API): | |
# dtoverlay=vc4-fkms-v3d | |
# If you wanted "full" KMS mode, fully open source "vc4" driver in the Linux kernel, you | |
# would use `dtoverlay=vc4-kms-v3d` instead, but then the identifiers in the Driver section | |
# need to be different. | |
# | |
# To run X clients on one screen or another: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!console.olog) { // eslint-disable-line no-console | |
const escapeHtml = str => `${str}`.replace('&', '&').replace('<', '<'); | |
console.olog = console.log; // eslint-disable-line no-console | |
console.log = (msg, ...args) => { // eslint-disable-line no-console | |
console.olog(msg, ...args); // eslint-disable-line no-console | |
document.getElementById('debugDiv').innerHTML += `<p>${escapeHtml(msg)} ${escapeHtml(args)}</p>`; | |
}; | |
console.debug = console.log; // eslint-disable-line no-console | |
console.info = console.log; // eslint-disable-line no-console | |
console.warn = console.log; // eslint-disable-line no-console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static class TraceLogger implements okhttp3.logging.HttpLoggingInterceptor.Logger { | |
/* | |
.client(new OkHttpClient(new okhttp3.OkHttpClient.Builder() | |
.addInterceptor(new okhttp3.logging.HttpLoggingInterceptor( | |
new TraceLogger(LoggerFactory.getLogger(FEIGN_TARGET))) | |
.setLevel(HttpLoggingInterceptor.Level.BODY)) | |
.build())) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Log visualizer</title> | |
<style type="text/css"> | |
div.logEntry { | |
border-bottom: 1px; | |
border-bottom-color: black; | |
border-bottom-style: solid; | |
position: relative; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<body style="width: 100%; font-family: helvetica,arial,sans-serif"> | |
<h1>Enhanced Pivotal Tracker Story Links!</h1> | |
<a style="align:center; font-size:40pt; text-decoration: none" href='javascript:void(function(){storyIdPattern = /.*\/([0-9]+)/;storyInternalIdPattern = /story_copy_link_(.*)/;var buttons=document.querySelectorAll("button.link[data-clipboard-text]");for (i = 0; i < buttons.length; i++) {var b=buttons[i];var textAttr=b.attributes.getNamedItem("data-clipboard-text");var storyId=storyIdPattern.exec(textAttr.value)[1];var idAttr=b.attributes.getNamedItem("id");var storyInternalId=storyInternalIdPattern.exec(idAttr.value)[1];var storyTitle=document.getElementById("story_name_"+storyInternalId).value;var idButton=document.getElementById("story_copy_id_"+storyInternalId);idButton.attributes.getNamedItem("data-clipboard-text").value=storyTitle + " [#"+storyId+"]"}}())'>Enhance Story Links</a> | |
<p>To use it: | |
<ol> | |
<li>Drag the above link to your bookmarks bar! | |
<li>Expand one or more stor |
NewerOlder