This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
check_installed() { | |
command -v "$1" >/dev/null 2>&1 || { | |
echo >&2 "$1 required but it's not installed. Aborting." | |
exit 1 | |
} | |
} | |
# Check required commands |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ocaml/opam2:4.07 | |
# Avoid warnings by switching to noninteractive | |
ENV DEBIAN_FRONTEND=noninteractive | |
# Install dependencies | |
RUN sudo apt-get update \ | |
&& sudo apt-get install -y --no-install-recommends m4 gcc-multilib \ | |
&& sudo rm -rf /var/lib/apt/lists/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from argparse import ArgumentParser | |
huffman_table = [ | |
"1111110101100100000010", | |
"1111110101100100000011", | |
"1111110101100100000100", | |
"1111110101100100000101", | |
"1111110101100100000110", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const QueryContext = React.createContext(); | |
export function QueryClientProvider({ children, client }) { | |
React.useEffect(() => { | |
const onFocus = () => { | |
client.queries.forEach((query) => { | |
query.subscribers.forEach((subscriber) => { | |
subscriber.fetch(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @param {{ model: DOMWidgetModel, el: HTMLElement }} context */ | |
export function render({ model, el }) { | |
const pull = () => { | |
const key = model.get("key"); | |
const value = model.get("value"); | |
if (localStorage.getItem(key) != value) { | |
if (value === null) { | |
localStorage.removeItem(key); | |
} else { |
OlderNewer