I hereby claim:
- I am lgastler on github.
- I am lgastler (https://keybase.io/lgastler) on keybase.
- I have a public key ASDio8xOELvAal08rItlpWz6AIzfZAZPs-P9rW7UCoH5EQo
To claim this, I am signing this object:
const puppeteer = require("puppeteer"); | |
const URL = "https://www.stura.uni-heidelberg.de/vs-strukturen/fachschaften/"; | |
(async () => { | |
const browser = await puppeteer.launch({ headless: true }); | |
const page = await browser.newPage(); | |
await page.setViewport({ width: 1920, height: 926 }); | |
await page.goto(URL); |
I hereby claim:
To claim this, I am signing this object:
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/lennart/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
stages: | |
- build | |
- prepare | |
- deploy | |
build: | |
stage: build | |
image: node:12 | |
environment: | |
name: stage |
// some credit for the base structure goes to Jacob Ebey who implemented a similar cache using redis (see: https://github.com/jacob-ebey/remix-ecommerce/tree/main/app) | |
interface RequestResponseCache { | |
(request: Request, maxAgeSeconds: number): Promise<Response>; | |
} | |
const YEAR_AGE = 31556926 | |
// a small hash function to hash a string using the worker compatible crypto engine | |
async function sha256(message: string) { |
import { | |
AnimatePresence, | |
motion, | |
useScroll, | |
useTransform, | |
} from "framer-motion"; | |
import { useEffect, useRef, useState } from "react"; | |
export default function HomePage() { | |
const stopAmount = 8; |
import Combine | |
import Foundation | |
@propertyWrapper @dynamicMemberLookup | |
class DebouncedObservedObject<Wrapped: ObservableObject>: ObservableObject { | |
var wrappedValue: Wrapped | |
private var subscription: AnyCancellable? | |
init(wrappedValue: Wrapped, delay: Double = 1) { | |
self.wrappedValue = wrappedValue |
class Debouncer<T>: ObservableObject { | |
@Published var input: T | |
@Published var output: T | |
private var debounce: AnyCancellable? | |
init(initialValue: T, delay: Double = 1) { | |
self.input = initialValue | |
self.output = initialValue | |
struct Endpoint<T: Decodable> { | |
var path: String | |
var type: T.Type | |
var method = HTTPMethod.get | |
var headers = [String: String]() | |
var keyPath: String? | |
} | |
extension Endpoint where T == Array<News> { | |
static let headlines = Endpoint(path: "api/users", type: Array<User>.self, keyPath: "data") |