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 md5 = require('md5'); | |
| const bs58 = require('bs58'); | |
| function doIt(...total) { | |
| const tlds = ["de","com","at","net"]; | |
| let generation = md5([doIt.toString(), ...tlds].join("@")); | |
| for (let g = 0; g < ~~(total[0]|10); ++g) { | |
| for (let i = 0; i < tlds.length; ++i, generation = md5([g,i,generation].join("-"))) { | |
| const firstFactor = bs58.encode(Buffer.from(generation.slice(0, 6))) | |
| const secondFactor = bs58.encode(Buffer.from(md5([doIt.toString(), generation].join("@")))) |
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
| esbuild --bundle --minify --platform=node --target=node12 --outdir=build index.js | |
| (cd ./build && zip -o lambda.zip index.js) | |
| aws lambda update-function-code --function-name whats-blundstone --zip-file fileb://./build/lambda.zip |
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 { EventEmitter } from 'events'; | |
| function Source() { | |
| let value = 0 | |
| const em = new EventEmitter() | |
| em.on('next', (val: any) => { | |
| console.log('next:', val) | |
| em.emit('push', JSON.stringify({ value: value++ })) | |
| if (value > 10000) { | |
| em.emit('close') |
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
| 45463de77aa79cc02ff8bf0558e397b64082dddc3e0d5694c47df140778f3878 nachlass | |
| -----BEGIN PGP MESSAGE----- | |
| Comment: GPGTools - http://gpgtools.org | |
| hQIMAz2FGl3wneucAQ//Uov7dRwInddDd+0C3V6SP/chvK/8Z9YtqVbfSq6etW4Q | |
| YgcoXrHOiXfBphsRKYLl5Z5xM3QMsEWrHoddwWRe+SLJW1bjbb4QwVlEjMjDmWKh | |
| gFMLa6dv/NH0pwjQSMkCAvek7kTPFrRCgfnRtBojeSNg3qOaOwuX9XHLp7s8ywYR | |
| 9N3ZXT5GfR7YBRCds4Hm/VbewI7DnNs6ngbktrPOXC3EqijsjQ7caQvo5GeoR0vk | |
| 4KvPDMd/CmaEit85Kv0UpEcscncg60+WmRxmyuthr+JvLxfV4Y8Cm+407Oh7wVPb | |
| sw51Ge+B1I/DGVSPPLS7tRtZ2B3nkVWiZALDHj0F/Xilp4pRF7ec7pWZQCCtd8wc |
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
| <html> | |
| <body> | |
| <canvas id="osi" width="600" height="400"></canvas> | |
| <canvas id="freq" width="600" height="400"></canvas> | |
| <script> | |
| const osi = document.getElementById('osi'); | |
| const osiCtx = osi.getContext('2d'); | |
| const freq = document.getElementById('freq'); | |
| const freqCtx = freq.getContext('2d'); |
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
| module type IpAddress = sig | |
| val x : int | |
| end;; | |
| module V4:IpAddress = struct | |
| let x = 3 | |
| end;; | |
| module V6:IpAddress = struct |
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
| mkdir ~/scan | |
| adf="" | |
| while [ ! \( "Q" = "$adf" -o "q" = "$adf" \) ] | |
| do | |
| echo -n "(D)uplex (S)implex (C)ontinue (Q)uit:" | |
| read -n1 adf | |
| if [ "C" = $adf -o "c" = $adf ] | |
| then | |
| echo "Continue: $serial" | |
| serial=`expr $serial + 1` |
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 abstractRx from '../abstract-rx'; | |
| export class Subject<T> { | |
| private subscribes: abstractRx.DataCallback[]; | |
| private completes: abstractRx.CompletesCallback[]; | |
| private errors: abstractRx.DataCallback[]; | |
| constructor() { | |
| this.subscribes = []; |
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
| interface Step { | |
| pos: number; | |
| step: State; | |
| } | |
| abstract class State { | |
| public next: State; | |
| public match: string; | |
| constructor(match: string) { |
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
| LetterReducer = function(letterReducers) { | |
| return function() { | |
| for (let letter of Array.from(arguments).filter((i) => i.letter)) { | |
| let ridx = ~~(letter.idx/4) | |
| let lr = []; | |
| if (letterReducers.has(ridx)) { | |
| lr = letterReducers.get(ridx); | |
| } else { | |
| letterReducers.set(ridx, lr); | |
| } |
NewerOlder