Skip to content

Instantly share code, notes, and snippets.

package btools.mapcreator;
import btools.expressions.BExpressionContextWay;
import btools.expressions.BExpressionMetaData;
import btools.util.DenseLongMap;
import btools.util.TinyDenseLongMap;
import com.mongodb.MongoClient;
import com.mongodb.client.MongoCollection;
import org.bson.Document;
@stesie
stesie / Dockerfile
Created December 6, 2021 07:00
Dockerfile behind stesie/libv8-xxx containers
FROM ubuntu:focal AS builder
RUN apt-get update && apt-get -y install build-essential curl git python libglib2.0-dev
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git /depot_tools
# export PATH=`pwd`/depot_tools:"$PATH"
ARG V8VER_FULL
RUN test "$V8VER_FULL" != ""
WORKDIR /tmp
<?php
require_once __DIR__.'/V8JsNodeModuleLoader_FileAccessInterface.php';
require_once __DIR__.'/V8JsNodeModuleLoader_NormalisePath.php';
/**
* Simple Node.js module loader for use with V8Js PHP extension
*
* This class understands Node.js' node_modules/ directory structure
* and can require modules/files from there.
*
@stesie
stesie / index.html
Created April 1, 2016 22:28
AWS IoT-based serverless JS-Webapp Pub/Sub demo
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>AWS IoT Pub/Sub Demo</title>
</head>
<body>
<h1>AWS IoT Pub/Sub Demo</h1>
<form>
<button type="button" id="connect">connect!</button>
@stesie
stesie / scan2pdf+ocr.sh
Created February 16, 2017 12:02
Shell script to scan pdf, tesseract (ocr) it and create pdf with down-sampled image with text overlay
#!/usr/bin/env bash
set -e
## SCAN settings
FORMAT="-l 0 -t 0 -x 210 -y 297"
MODE=color
RESOLUTION=300
LANG=deu
postprocess_scan() {