xhost +local:docker
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix ...
Every now and then I want to run X apps inside docker, and then I always hit some issues.
| // ==UserScript== | |
| // @name slido mark as read | |
| // @namespace https://flandre.tw | |
| // @version 0.0.2 | |
| // @description Add "mark as read" function to slido question | |
| // @author FlandreDaisuki | |
| // @match https://app.sli.do/event/* | |
| // @require https://unpkg.com/winkblue@0.0.7/dist/winkblue.umd.js | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=sli.do | |
| // @grant none |
FP 在應用程式的高峰可能在 2013~2014 左右,那時 John Carmack port Wolf3D 到 Haskell 上,還提到:
I haven't done any functional programming since I started crunching at Oculus, but I consider the time I spent on it extremely worthwhile.
也說過:
I feel a touch of impostor syndrome when I get invited to speak at functional programming conferences.
同年 (2014) audreyt 在 FLOLAC'14 給了演講《函數程式設計的商業應用》。
| #!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
| # syntax = docker/dockerfile:1.4.0 | |
| FROM node:20 | |
| WORKDIR /root | |
| RUN npm install sqlite3 |
原專案 README: https://github.com/openvanilla/fcitx5-mcbopomofo#readme
sudo apt install -y fcitx5 fcitx5-chinese-addons| version: '3.7' | |
| services: | |
| http-server: | |
| container_name: http-server | |
| image: python:alpine | |
| working_dir: /root | |
| volumes: | |
| - $PWD:/root:ro | |
| command: python -m http.server ${HTTP_SERVER_PORT:-24680} |
| let cache = new Map(); | |
| let pending = new Map(); | |
| function fetchTextSync(url) { | |
| if (cache.has(url)) { | |
| return cache.get(url); | |
| } | |
| if (pending.has(url)) { | |
| throw pending.get(url); | |
| } |
| #!/bin/bash | |
| set -e | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <path to video which play on chrome>" | |
| exit 1 | |
| fi | |
| FILEPATH="$1" |
| module Student = struct | |
| type t = { id: int; name: string; } | |
| let init (id, name) = { id = id; name = name; } | |
| end | |
| ;; | |
| let alice = Student.init(0, "Alice") | |
| (* val alice : Student.t = {Student.id = 0; name = "Alice"} *);; | |
| let () = Printf.printf "Hello, %s\n" alice.name |