Skip to content

Instantly share code, notes, and snippets.

View FlandreDaisuki's full-sized avatar
🌈
世界にバグは不要です

Chun-Hao Lien FlandreDaisuki

🌈
世界にバグは不要です
View GitHub Profile
@FlandreDaisuki
FlandreDaisuki / slido-mark-as-read.user.js
Last active May 12, 2024 10:29
安裝 Tampermonkey 後,點 Raw 下載→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→↘
// ==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 給了演講《函數程式設計的商業應用》

@FlandreDaisuki
FlandreDaisuki / Dockerfile
Created January 14, 2024 15:52 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/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
@FlandreDaisuki
FlandreDaisuki / _node-basic-websocket-server.md
Created November 29, 2023 10:25 — forked from kevinchisholm/_node-basic-websocket-server.md
Code Examples for my Blog Post: Create a Node.js Websocket Server in Five Minutes
@FlandreDaisuki
FlandreDaisuki / one-time-ngrok.yml
Last active May 15, 2022 10:35
docker-compose -f one-time-ngrok.yml up
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}
@FlandreDaisuki
FlandreDaisuki / Infrastructure.js
Created February 19, 2022 01:42 — forked from sebmarkbage/Infrastructure.js
SynchronousAsync.js
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
@FlandreDaisuki
FlandreDaisuki / index.html
Last active August 21, 2021 08:38
single-page-file-watcher-poc
<pre><code id="output"></code></pre>
<script>
// https://stackoverflow.com/a/59925724
if (/^file:\/\/\//.test(location.href)) {
let path = './';
let orig = fetch;
window.fetch = (resource) => ((/^[^/:]*:/.test(resource)) ?
orig(resource) :
new Promise(function(resolve, reject) {
let request = new XMLHttpRequest();