I hereby claim:
- I am mxschmitt on github.
- I am mxschmitt (https://keybase.io/mxschmitt) on keybase.
- I have a public key ASDPG84oimGzLROyuqwyqaszOsIBpR53Hn2grlElhCzf6Ao
To claim this, I am signing this object:
| #!/bin/bash | |
| # Using the Librespot client libary for streaming the Spotfiy connect sound via http | |
| # Instruction: | |
| # 1. Drop this script into the root directory of the librespot repository => https://github.com/plietar/librespot | |
| # 2. Install the dependencies => "sudo apt-get install vlc ffmpeg" | |
| # 3. Set the correct privileges => "chmod +x start.sh" | |
| # 4. Set the librespot directory owner to a non-root user | |
| # 5. Switch to this user | |
| # 6. Change the variables under this instruction for your needs |
| @echo off | |
| echo Stdout | |
| echo Stderr 1>&2 |
| Date.prototype.toABAPString = function () { | |
| let formatNumber = number => ("0" + number).slice(-2); | |
| return this.getFullYear() + formatNumber(this.getUTCMonth() + 1) + formatNumber(this.getUTCDate()) + formatNumber(this.getUTCHours()) + formatNumber(this.getUTCMinutes()) + formatNumber(this.getSeconds()); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| const sum(a, b) => { | |
| const maxLength = Math.max(a.length, b.length) | |
| const out = [] | |
| for (let i = 0, carry = false; i < maxLength || carry; i++) { | |
| const numA = i < a.length ? parseInt(a[a.length - 1 - i], 10) : 0 | |
| const numB = i < b.length ? parseInt(b[b.length - 1 - i], 10) : 0 | |
| const sum = numA + numB + (carry ? 1 : 0) | |
| carry = sum >= 10 | |
| out.unshift(sum % 10) | |
| } |
| ################################################ | |
| # Compile with: | |
| # docker build -t mcr.microsoft.com/playwright:python-buster -f Dockerfile.buster . | |
| # | |
| # Run with: | |
| # docker run -d -p --rm --name playwright mcr.microsoft.com/playwright:python-buster | |
| # | |
| ################################################# | |
| FROM python:3.8-slim-buster |
| package playwright | |
| import ( | |
| "reflect" | |
| "sync" | |
| ) | |
| type ( | |
| incomingEvent struct { | |
| name string |
| // Run it with: node --harmony-top-level-await test.mjs | |
| import { createServer } from 'http' | |
| import { on } from 'events' | |
| const PORT = 3000 | |
| const reqs = on(createServer().listen(PORT), "request") | |
| console.log(`Listening on port ${PORT}`) | |
| for await (const [req, res] of reqs) | |
| res.end(`User-Agent: ${req.headers["user-agent"]}`) |
| Try Playwright (try.playwright.tech) rewrite | |
| +-----------------------------------------------------------------------+ +------------------------------------------------------------------------------------------------------------------------------------+ | |
| | Before | | N times After N times | | |
| | 1x time 1x time | | +------------------------+ +------------------------------------------------+ | | |
| | +------------------+ +------------------------+ | | | | | | | | |
| | | | | | | | | Frontend (LB) | +------------------+ |