Skip to content

Instantly share code, notes, and snippets.

@domoritz
domoritz / .block
Last active May 12, 2024 22:27
Vega-Lite Bl.ocks example
license: bsd-3-clause
@dergeberl
dergeberl / README.md
Created September 8, 2021 19:46
Raspberry Pi cm4 dfrobot router board - openwrt 21.02 installation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar</title>
<style>
.scroll-box {
position: relative;
/* border-right: 1px solid #000; */
@nitaku
nitaku / README.md
Last active May 12, 2024 22:24
Minimal JSON HTTP server in python

A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.

python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar</title>
<style>
.scroll-box {
position: relative;
/* border-right: 1px solid #000; */
@saliou673
saliou673 / How to create maven mutli module project.adoc
Created November 1, 2022 10:29
How to create maven mutli module project

Créer un projet maven avec plusieurs modules ?

Avantages

  • Découper un projet en module (front, backend, …​)

  • Maven s’occupe de l’ordre d’exécution

  • Une seule commande pour tout construire

  • Configuration CI-Server facile (un seul Job Jenkins suffit)

@eldh
eldh / useMousePosition.ts
Created September 15, 2020 17:01
useMousePosition
import * as React from "react";
import { throttle } from "lodash";
/**
* Mouse position as a tuple of [x, y]
*/
type MousePosition = [number, number];
/**
* Hook to get the current mouse position
import * as React from "react";
import { useMousePosition } from "~/hooks/useMousePosition";
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) {
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {};
const [mouseX, mouseY] = useMousePosition();
const positions = { x, y, h, w, mouseX, mouseY };
return (
<div
@ole
ole / swift-has-feature.sh
Last active May 12, 2024 22:20
swift-list-feature: List Swift compiler upcoming and experimental feature flags. ★ swift-has-feature: Check if a given compiler knows a specific feature flag, and whether it's an upcoming or experimental flag.
#!/bin/zsh
# Test if the Swift compiler knows about a particular language feature.
#
# Usage:
#
# swift-has-feature [--swift SWIFT_PATH] [--language-version LANGUAGE_VERSION] FEATURE
#
# The feature should be an upcoming or experimental language feature,
# such as `"StrictConcurrency"` or `"ExistentialAny"`.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar</title>
<style>
.scroll-box {
position: relative;
/* border-right: 1px solid #000; */