Clone this repo:
$ git clone https://gist.github.com/23ad8d6e3a1509335253ff074fcd3cb6.git helia-b2b-sharing
$ cd helia-b2b-sharing/Generate npm-browser.js npm package bundle:
| """ | |
| stable diffusion dreaming | |
| creates hypnotic moving videos by smoothly walking randomly through the sample space | |
| example way to run this script: | |
| $ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry | |
| to stitch together the images, e.g.: | |
| $ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4 |
| pragma solidity ^0.8.14; | |
| contract MutablePure { | |
| uint256 val; | |
| function mutate() external pure { | |
| _execAsPure(_mutate); | |
| } | |
| function _mutate() internal { |
| const bs58 = require('bs58') | |
| const contentHash = require('content-hash') | |
| const domain = 'app.uniswap.org' | |
| const text = `ipns://${domain}` | |
| const matched = text.match(/^(ipfs|ipns|bzz|onion|onion3):\/\/(.*)/) || text.match(/\/(ipfs)\/(.*)/) || text.match(/\/(ipns)\/(.*)/) | |
| const contentType = matched[1] | |
| const content = matched[2] | |
| const bs58content = bs58.encode( |
| import React from 'react' | |
| /** | |
| * @typedef {object} State The state of asynchronous hooks. | |
| * @property {object | null} error The error. | |
| * @property {boolean} pending Whether the call is pending. | |
| * @property {any | null} result The result of the asynchronous call. | |
| */ | |
| /** @type {State} */ |
| // Based on this blog post: https://medium.com/@iquardt/taming-the-dom-50c8f1a6e892 | |
| /* RULES | |
| * Only the program may manipulate the output display, never the user | |
| * User input is presented in the form of events | |
| * GUI elements generate events only in response to user input, never in response to program output | |
| */ |
| function asyncFunc(e) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(() => resolve(e), e * 1000); | |
| }); | |
| } | |
| const arr = [1, 2, 3]; | |
| let final = []; | |
| function workMyCollection(arr) { |
| #!/bin/bash | |
| # Script for installing Fish Shell on systems without root access. | |
| # Fish Shell will be installed in $HOME/local/bin. | |
| # It's assumed that wget and a C/C++ compiler are installed. | |
| # exit on error | |
| set -e | |
| FISH_SHELL_VERSION=2.1.1 |
| // Determine if an element is in the visible viewport | |
| function isInViewport(element) { | |
| var rect = element.getBoundingClientRect(); | |
| var html = document.documentElement; | |
| return ( | |
| rect.top >= 0 && | |
| rect.left >= 0 && | |
| rect.bottom <= (window.innerHeight || html.clientHeight) && | |
| rect.right <= (window.innerWidth || html.clientWidth) | |
| ); |