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 "./temporal-polyfill.js"; | |
| import * as z from "zod"; | |
| import * as zt from "zod-temporal"; | |
| interface TimeSchemas { | |
| Instant: z.Schema; | |
| LocalDateTime: z.Schema; | |
| } | |
| const isoSchemas = { |
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
| { | |
| "@context": { | |
| "@version": 1.1, | |
| "@protected": true, | |
| "summary": "https://w3id.org/2023/tractusx/credentials/summary/", | |
| "id": "@id", | |
| "type": "@type", | |
| "SummaryCredential": { | |
| "@context": [ | |
| "https://gist.githubusercontent.com/timjb/520915f8cb527443102aff793b481988/raw/9fa7f71462afdeed2b2aa2d8aef66480784466e0/credentials.json" |
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
| namespace BigNats { | |
| type RepeatHelper<N extends number, T extends any, CurrList extends T[], CurrSizes extends number[]> = | |
| CurrSizes extends [1] | |
| ? (CurrList["length"] extends N ? ["found", CurrList] : ["not-found", Cons<T,CurrList>]) | |
| : { | |
| "true": RepeatHelper<N, T, CurrList, Tail<CurrSizes>> extends ["not-found", infer NewCurrList] | |
| ? RepeatHelper<N, T, Cast<NewCurrList, T[]>, Tail<CurrSizes>> | |
| : RepeatHelper<N, T, CurrList, Tail<CurrSizes>> | |
| }[CurrSizes extends [-1] ? "not-going-to-happen" : "true"]; |
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
| // adapted from https://stackoverflow.com/a/28345802 | |
| import org.junit.rules.TestRule; | |
| import org.junit.runner.Description; | |
| import org.junit.runners.model.Statement; | |
| public class RepeatRule implements TestRule { | |
| private static class RepeatStatement extends Statement { | |
| private final Statement statement; |
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
| {-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE TemplateHaskell #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE RecordWildCards #-} | |
| module GithubUser where | |
| import JSONFormat |
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
| /* angepasster CSS-Code von */ | |
| /* https://marketpress.de/2019/schriftarten-atomion/ */ | |
| body, | |
| button, | |
| select, | |
| optgroup, | |
| textarea { | |
| font-family: mr-eaves-sans, sans-serif; | |
| } |
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
| module SizedTrees where | |
| open import Agda.Builtin.Size | |
| data list (A : Set₀) : Set₀ where | |
| nil : list A | |
| cons : A → list A → list A | |
| map : ∀{A B} → (A → B) → list A → list B | |
| map f nil = nil |
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 zsh | |
| print -- "usage: $0:t" | |
| print -- " generate a password using the ypassword method" | |
| print -- " See http://ypassword.espozito.com for more informations" | |
| passfile="$HOME/.passwd" | |
| echo -n "Enter your master password please: " | |
| oldmodes=$(stty -g) |
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
| use std::cmp::Ordering; | |
| struct UnionFindEntry { | |
| parent: usize, | |
| rank: usize, | |
| } | |
| struct UnionFind { | |
| trees: Vec<UnionFindEntry>, | |
| } |
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
| module Main where | |
| import Data.List (intercalate) | |
| import Control.Monad (forM_) | |
| type Nat = Int | |
| type Prime = Nat | |
| type HashFunction = Int -> Int | |
| type HashFunctionFamily = Nat -> HashFunction |
NewerOlder