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 debian:bookworm-slim | |
| RUN apt-get -y update \ | |
| && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ | |
| bash-builtins \ | |
| bind9-dnsutils \ | |
| binutils \ | |
| bsdextrautils \ | |
| ca-certificates \ | |
| coreutils \ |
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 sys | |
| from itertools import chain | |
| from time import sleep | |
| def neighbors(point): | |
| x, y = point | |
| yield x + 1, y | |
| yield x - 1, y |
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
| <?php | |
| use Illuminate\Support\LazyCollection; | |
| $columns = LazyCollection::make(function() { | |
| yield $i = 1 => $c = 'A'; | |
| while (true) { | |
| yield ++$i => $c = str_increment($c); | |
| } |
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 sys | |
| def columns(end): | |
| char_a = ord('A') | |
| alpha_iter = lambda: (chr(c) for c in range(char_a, char_a + 26)) | |
| p = [alpha_iter()] | |
| v = [None] |
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 | |
| # | |
| # Usage: watch.sh "<command>" [interval] | |
| # https://stackoverflow.com/questions/9574089/os-x-bash-watch-command | |
| pid=$$ | |
| command="$1" | |
| # default interval of 2 seconds | |
| interval="${2:-2}" |
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
Show hidden characters
| { | |
| "name": "Debian", | |
| "image": "mcr.microsoft.com/devcontainers/base:bookworm", | |
| "customizations": { | |
| "vscode": { | |
| "extensions": [ | |
| "fwcd.kotlin", | |
| "vscjava.vscode-java-pack" | |
| ] | |
| } |
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 http = require('http'); | |
| const server = http.createServer(async function(req, res) { | |
| const buffers = []; | |
| for await (const data of req) { | |
| buffers.push(data); | |
| } | |
| let body = null; | |
| if (buffers.length > 0) { |
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 | |
| ## Create the response FIFO | |
| rm -f response | |
| mkfifo response | |
| function handle_GET_home() { | |
| RESPONSE=$(cat home.html | \ | |
| sed "s/{{$COOKIE_NAME}}/$COOKIE_VALUE/") | |
| } |
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 | |
| set -e | |
| CCH23_PORT="${1:?port argument is required}" | |
| NAMESPACE="cch23-codeman99" | |
| LOGIN_EMAIL="codemister99@yahoo.com" | |
| LOGIN_PASSWORD="cch23" | |
| SERVER_JSON_TMP="$(mktemp server-XXX.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
| hello: hello.o | |
| ld hello.o -o hello -s -n | |
| hello.o: hello.s | |
| as hello.s -o hello.o | |
NewerOlder