Skip to content

Instantly share code, notes, and snippets.

@tveimo
tveimo / index.html
Created July 4, 2025 02:00
ArcGIS JS SDK simple globe example with gray basemap
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"/>
<title>Globe</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.33/esri/themes/light/main.css"/>
<script src="https://js.arcgis.com/4.33/"></script>
<style>
@tveimo
tveimo / gist:9ed80c181d80c449cc95dcf079c47cd6
Created July 19, 2023 13:32
test.mts, causes "RangeError: Maximum call stack size exceeded" with kontent-ai/kontent-delivery-node-parser, run with ts-node --esm test.mts
import { createRichTextHtmlResolver, Elements } from "@kontent-ai/delivery-sdk";
import { nodeParser } from "@kontent-ai/delivery-node-parser";
function test() {
const richTextElement = {
"images": [],
"linkedItemCodenames": [],
"linkedItems": [],
"links": [{
"codename": "n2023_24_budget",
@tveimo
tveimo / gist:9b8cbfaf2f2b527c2dec
Last active August 29, 2015 14:24
build openjdk 9 on osx with support for subpixel rendering on translucent surfaces
# building openjdk 9 on osx with subpixel antialiasing support for translucent surfaces
# openjdk 9 b70 from oracle already supports subpixel font rendering, just not for translucent surfaces
hg clone http://hg.openjdk.java.net/jdk9/jdk9 jdk9
cd ./jdk9
bash ./get_source.sh
cd jdk
# enable faster subpixel AA (this patch is now in OpenJDK 9 b76, so no longer required)
# curl http://cr.openjdk.java.net/~bae/8087201/9/webrev.01/jdk.patch | patch --dry-run -p1
@tveimo
tveimo / gist:5677ccc024afe115d4bc
Last active August 29, 2015 14:24
patch openjdk 9 b70 to support subpixel rendering on translucent surfaces
--- src/java.desktop/share/classes/sun/java2d/opengl/OGLSurfaceData.java-orig 2015-07-02 17:37:58.000000000 +1000
+++ src/java.desktop/share/classes/sun/java2d/opengl/OGLSurfaceData.java 2015-07-02 17:38:59.000000000 +1000
@@ -412,7 +412,7 @@
public boolean canRenderLCDText(SunGraphics2D sg2d) {
return
graphicsConfig.isCapPresent(CAPS_EXT_LCD_SHADER) &&
- sg2d.surfaceData.getTransparency() == Transparency.OPAQUE &&
+/* sg2d.surfaceData.getTransparency() == Transparency.OPAQUE && */
sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR &&
(sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY ||