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
function findJsonObjects( { str } ) { | |
if( typeof str === undefined ) { | |
console.log( `str is undefined.` ) | |
process.exit( 1 ) | |
} else if( typeof str !== 'string' ) { | |
console.log( `str is not type of string: "${str}"` ) | |
process.exit( 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
#getRootAbsolutePath() { | |
const __filename = fileURLToPath( import.meta.url ) | |
const __dirname = path.dirname( __filename ) | |
const root = new Array( 10 ) | |
.fill() | |
.reduce( ( acc, a ) => { | |
try { | |
acc['_acc'] = path.resolve( acc['_acc'], '..' ) | |
const files = fs.readdirSync( acc['_acc'] ) |
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
{ | |
"projectName": "", | |
"name": "Hello Project", | |
"description": "", | |
"contracts": [ | |
{ | |
"name": "hello-world", | |
"description": "", | |
"source": "", | |
"destination": "" |
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
class ValueModifier { | |
#config | |
constructor( config ) { | |
this.#config = config | |
return true | |
} | |
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 base58check from 'bs58check' | |
class MinaMemo { | |
#config | |
constructor() { | |
this.#config = { | |
'maxLength': 32, |
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 fs from 'fs' | |
import path from 'path' | |
class DocumentSplitter { | |
#config | |
#silent | |
constructor( silent=false ) { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Spiralförmige Pixelanimation mit Raster und Delay</title> | |
<style> | |
canvas { | |
border: 1px solid black; | |
} |
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
function getTableInAscii( { headlines, items, nr="Nr", splitter=true } ) { | |
function getRow( { rowItems, maxLengths } ) { | |
const row = rowItems | |
.reduce( ( acc, a, index, all ) => { | |
index === 0 ? acc += '| ' : '' | |
const l = maxLengths[ index ] - a.length | |
acc += a | |
acc += new Array( l ).fill( ' ' ).join( '' ) | |
if( all.lenght -1 === index ) { |
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 bitcoin = require( 'bitcoinjs-lib' ) | |
const { ECPairFactory } = require( 'ecpair' ) | |
const ecc = require( 'tiny-secp256k1' ) | |
const crypto = require( 'crypto' ) | |
const ECPair = ECPairFactory( ecc ) | |
const result = { | |
'private': { | |
'str': '1', | |
'hex': null, |
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
function findClosestString( { input, keys } ) { | |
function distance( a, b ) { | |
let dp = Array( a.length + 1 ) | |
.fill( null ) | |
.map( () => Array( b.length + 1 ) | |
.fill( 0 ) | |
) | |
.map( ( z, index, all ) => { | |
index === 0 ? z = z.map( ( y, rindex ) => rindex ) : '' | |
z[ 0 ] = index |
NewerOlder