flowchart LR
a((a)) --> b((a))
classDef default stroke:#333,stroke-width:2px
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
| ! Title: Clean DCInside UI | |
| ! Homepage: https://gist.github.com/scarf005/50451bd971f647da7b4f5f79798a53e6/edit | |
| ! λ‘κ°€ λ‘μ€νΈμν¬κ°€ κ΅¬λΆ | |
| ||https://gall.dcinside.com/board/lists/?id=lostark$all | |
| google.*##.g:has(a[href*="https://gall.dcinside.com/board/lists/?id=lostark"]) | |
| ||dcimg5.dcinside.com/dccon.php?no=62b5df2be09d3ca567b1c5bc12d46b394aa3b1058c6e4d0ca41648b65feb246efc7dee44a100573d4877e943faabd47cae7095ad596fb484b6618dc825dbe838dcd667f5$image |
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 NoImplicitPrelude #-} | |
| import Data.Bool (Bool, (&&), (||)) | |
| import Numeric.Natural (Natural) | |
| import Prelude (Int, (+), (-)) | |
| {- | | |
| λ§κ·Έλ§(Magma)λ μ§ν©κ³Ό 'λ«ν' μ΄ν μ°μ°μ (μ΄ν μ°μ°μ κ²°κ³Όκ° μ§ν©μ μν¨) | |
| (π, β’) β’ β a, b β π βΉ a β’ b β π. |
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 * as dotenv from "https://deno.land/std@0.194.0/dotenv/mod.ts" | |
| import { basename } from "https://deno.land/std@0.194.0/path/mod.ts" | |
| import { Command } from "https://deno.land/x/cliffy@v1.0.0-rc.2/command/mod.ts" | |
| import { z } from "https://deno.land/x/zod@v3.21.4/mod.ts" | |
| import { asynciter } from "https://deno.land/x/asynciter@0.0.18/mod.ts" | |
| import { difference } from "https://deno.land/x/set_operations@v1.1.1/mod.ts" | |
| import { match, P } from "npm:ts-pattern@^5.0.3" | |
| const cookieKey = "AOC_SESSION" | |
| const cookieSchema = z.string().min(1, "Session cannot be empty!") |
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 { initContract, ServerInferResponseBody, ServerInferResponses } from "npm:@ts-rest/core" | |
| import z, { boolean } from "npm:zod" | |
| import { createExpressEndpoints, initServer } from "npm:@ts-rest/express" | |
| // @deno-types=npm:@types/express | |
| import express from "npm:express" | |
| const dataSchema = z.object({ data: z.boolean().default(false) }) | |
| type DataInfer = z.infer<typeof dataSchema> | |
| type DataInput = z.input<typeof dataSchema> |
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 -S deno run --allow-run --allow-read --no-config --no-check --no-npm | |
| import clipboard from "https://deno.land/x/clipboard@v0.0.2/mod.ts" | |
| import { readAll } from "https://deno.land/std@0.192.0/streams/mod.ts" | |
| const filename = Deno.args[0] | |
| if (filename) { | |
| const text = await Deno.readTextFile(filename) | |
| await clipboard.writeText(text) | |
| } else if (!Deno.isatty(Deno.stdin.rid)) { |
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 bash | |
| readonly GREEN='\033[32m' | |
| readonly NC='\033[0m' | |
| header() { printf "${GREEN}$@${NC}"; } | |
| readonly LOCATION=$(pwd)/bash-in-a-jar | |
| header "installation location:\n" | |
| echo ${LOCATION} |
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
| export const mapEntries = <T, U>( | |
| obj: Record<string, T>, | |
| fn: (entry: [string, T]) => [string, U], | |
| ) => Object.fromEntries(Object.entries(obj).map(fn)) |
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
| const getUrl = (elem: Element) => elem.getAttribute("href")!.split("?")[0] | |
| const setQuery = (selector: string, query: string) => () => { | |
| const elem = document.querySelector(selector) | |
| if (!elem) { | |
| console.log(`elem with ${selector} not found`) | |
| return | |
| } | |
| const newSearchParams = new URLSearchParams({ q: query }) | |
| elem.setAttribute("href", `${getUrl(elem)}?${newSearchParams}`) |
ν μ€νΈ νκ²½