View bookmarklets.js
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
/* jshint -W028 */ | |
// bookmarklets to summarize the shown webpage. | |
// replace XXXInsertAPIKeyHereXXX with your API key to use these bookmarklets. | |
// this summarizes the text on the page. (We might have to cut it down to 3000 words, because the API has a limit of 3000 words.) | |
javascript:(async () => { | |
var apikey = "XXXInsertAPIKeyHereXXX"; | |
const maxwordcount = 2500; | |
try { |
View suggestCommand.js
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
// see also https://platform.openai.com/playground?mode=complete | |
// command line example: | |
// node suggestCommand.js "Write a bash command line to do the following: log the last 3 git commits" | |
// Needs an API key in ~/.openaiapi , see https://beta.openai.com/docs/api-reference/authentication | |
// Idea for a shellscript calling that. You could also add things to the prompt there. | |
// #!/bin/bash | |
// node "$(dirname "$(readlink -f "$0")")/suggestCommand.js" "$*" | |
const axios = require('axios'); | |
const fs = require('fs'); |
View getpackage.java
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
/** | |
* This is a servlet that enables to download a package of a JCR subtree without | |
* having to create a package in the package manager. The package is | |
* created on the fly, and not saved to disk / the repository, so this is | |
* better suited to large content trees, but valuable also for quickly downloading | |
* a page. | |
* | |
* CAUTION: not suitable for production, only for internal testing systems! | |
* | |
* Usage with curl e.g. |
View AutoEncoderDemo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View PredictVariability.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View CharsetStress.java
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
package net.stoerr.testing; | |
import java.io.UnsupportedEncodingException; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Returns a couple of teststrings to detect character escaping problems. This file encodes all chars numerically to | |
* make sure we are independent of the encoding of this file. Caution: this currently covers only relatively common | |
* stuff - it does not yet lead into the deeper realms of UTF like substitutes, right to left, Kanji, characters |
View LockAsAutoCloseable.java
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
import javax.annotation.Nonnull; | |
import java.util.Objects; | |
import java.util.concurrent.locks.Lock; | |
/** | |
* Allows using a {@link java.util.concurrent.locks.Lock} with a try with resources, e.g.: | |
* <code> try (LockAsAutoCloseable locked = LockAsAutoCloseable.lock(lock)) { ... } </code> . | |
*/ | |
@SuppressWarnings("LockAcquiredButNotSafelyReleased") | |
public class LockAsAutoCloseable implements AutoCloseable { |
View threaddump.jsp
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
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" | |
pageEncoding="ISO-8859-1"%> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<%-- | |
This JSP lists all threads with stati as configured in a checklist, optionally whose names match a specified regex. | |
If two threads have the same stacktrace, they are shown together and the stacktrace is printed only once. | |
--%> | |
<%@page import="java.util.*"%> | |
<%@page import="javax.servlet.*"%> | |
<%@page import="java.io.*"%> |
View AutomaticTextGenerationCharbased.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View prepare-commit-msg
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
#!/bin/bash | |
# If you use branch names with JIRA ticket numbers in them, e.g. feature/ABC-4324-do-something, | |
# this includes automatically the ticket number (ABC-4324) at the start of the the commit message. | |
# This way, it's later easy to see which change was done for which ticket, without any manual effort. | |
# You need to copy or link this file into .git/hooks/prepare-commit-msg | |
# You can customize which branches should be skipped when prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi |
NewerOlder