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
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
#!/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
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
<?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
0000000000000000000000000000000000000000000000000000000000000000 | |
0000000000000000000000000010000000000000000000000000000000000000 | |
0000000000000000000000001010000000000000000000000000000000000000 | |
0000000000000011000000110000000000001100000000000000000000000000 | |
0000000000000100010000110000000000001100000000000000000000000000 | |
0011000000001000001000110000000000000000000000000000000000000000 | |
0011000000001000101100001010000000000000000000000000000000000000 | |
0000000000001000001000000010000000000000000000000000000000000000 | |
0000000000000100010000000000000000000000000000000000000000000000 | |
0000000000000011000000000000000000000000000000000000000000000000 |
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 |
OlderNewer