Skip to content

Instantly share code, notes, and snippets.

View louwers's full-sized avatar
🇪🇺

Bart Louwers louwers

🇪🇺
View GitHub Profile
@louwers
louwers / main.cc
Last active March 27, 2023 23:42
Shader registry using static template variable
$ g++ --std=c++17 -c maplibre.cc
$ ar rvs maplibre.a maplibre.o
$ g++ --std=c++17 main.cc maplibre.a
$ ./a.out
hello world
I am derived

Keybase proof

I hereby claim:

  • I am louwers on github.
  • I am louwers (https://keybase.io/louwers) on keybase.
  • I have a public key whose fingerprint is E4F2 E7A5 6C0B BAE7 4C80 7EB3 18FD EEDE 3792 14B6

To claim this, I am signing this object:

#!/usr/bin/node
var path = require('path');
const { exit } = require("process");
const util = require('node:util');
const exec = util.promisify(require('node:child_process').exec);
var filename = path.basename(__filename);
// As can be seen when you run
type SimplyGeometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon;
type Geometry = SimplyGeometry | GeometryCollection
type Position = number[];
export interface Point {
type: "Point";
coordinates: Position;
}
var readline = require("readline");
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false,
});
async function* getLineGen() {
for await (const line of rl) {
yield line;
@louwers
louwers / cpp-core-guidelines-to-pdf.sh
Created January 9, 2022 23:22
CppCoreGuideLines PDF
#!/bin/bash
# Here is how you can get a pretty good PDF of the C++ Core Guidelines
wget wget -nd -r -l 2 -A png http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
pandoc CppCoreGuidelines.html -o cpp-core-guidelines.pdf
[bart@samadhi ~]$ cabal install hakyll
Resolving dependencies...
Build profile: -w ghc-8.8.3 -O1
In order, the following will be built (use -v for more details):
- enclosed-exceptions-1.0.3 (lib) (requires download & build)
- hs-bibutils-6.8.0.0 (lib) (requires download & build)
- http2-1.6.5 (lib) (requires download & build)
- lrucache-1.2.0.1 (lib:lrucache) (requires download & build)
- rfc5051-0.1.0.4 (lib) (requires download & build)
- semigroups-0.19.1 (lib) (requires download & build)
111963 ? Sl 0:00 /home/bart/src/haskell-ide-engine/.stack-work/install/x86_64-linux-tinfo6/bbcf3bf3969579016955a27e588a21bfbe0d0d7e8644b1b65529ffec02981bf9/8.8.2/bin/hie-wrapper --lsp -d --vomit
112079 ? Sl 0:00 /usr/bin/hie-8.6.5 --lsp -d --vomit
lookupHtmlForModule :: (FilePath -> FilePath -> FilePath) -> DynFlags -> Module -> IO (Maybe FilePath)
lookupHtmlForModule mkDocPath df m = do
let mfs = go <$> (listToMaybe =<< lookupHtmls df ui)
htmls <- filterM doesFileExist (concat . maybeToList $ mfs)
return $ listToMaybe htmls
where
go pkgDocDir = map (mkDocPath pkgDocDir) [mn, mns]
ui = moduleUnitId m
mn = map (\x -> if x == '.' then '-' else x) mns
mns = moduleNameString $ moduleName m
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "This schema represents a person's blood pressure as a combination of systolic and diastolic blood pressure.",
"type": "object",
"references": [
{
"description": "The SNOMED codes represents Blood pressure (observable entity)",
"url": "http://purl.bioontology.org/ontology/SNOMEDCT/75367002"
}