:tabnew- new blank tab:tabedit [file]- open file in tab
gt(:tabn) - next tab
| /** | |
| * General-purpose NodeJS CLI/API wrapping the Stable-Diffusion python scripts. | |
| * | |
| * Note that this uses an older fork of stable-diffusion | |
| * with the 'txt2img.py' script, and that script was modified to | |
| * support the --outfile command. | |
| */ | |
| var { spawn, exec } = require("child_process"); | |
| var path = require("path"); |
| // x,y is bottom left corner | |
| var Rectangle = function Rectangle(x,y,w,h){ | |
| this.x = x; | |
| this.y = y; | |
| this.width = w; | |
| this.height = h; | |
| } | |
| // SOLUTION | |
| var checkIntersect = function checkIntersect(r1,r2) { |
| import { decode } from "blurhash" | |
| export function blurHashToDataURL(hash: string | undefined): string | undefined { | |
| if (!hash) return undefined | |
| const pixels = decode(hash, 32, 32) | |
| const dataURL = parsePixels(pixels, 32, 32) | |
| return dataURL | |
| } |
| # rack_sse.ru | |
| # | |
| # An example of basic real-time, single-room broadcast chat using Server Sent | |
| # Events in plain old Rack. This example does NOT use hijack, or the async | |
| # hacks, it just relies on a well implemented threaded Rack server (at time of | |
| # writing this will therefore only work with puma!). Other servers should be | |
| # fixed to support this, as it is pretty critical to how Rack *should* work on | |
| # most servers. The only spec-acceptable failure in this case is not flushing | |
| # the content stream on each yield (for which the rack spec has no workaround | |
| # today). |
| const { svg, prng, perlin, picker, array, dist, shuffle } = Pxyz | |
| const { circle, line, polyline, group, rect } = Pxyz | |
| // setup | |
| const rand = prng(Atelier.seed()) | |
| const noise = perlin(15, rand) | |
| // variables | |
| const { width: W, height: H } = Atelier.resize(105, 148) | |
| const M = 10 |
| FROM node:gallium-buster as jsbuilder | |
| ARG BUILD_DATE | |
| ARG GIT_REF | |
| ARG GIT_SHA | |
| ENV NODE_OPTIONS=--max_old_space_size=4096 | |
| WORKDIR /app |