These are some of the Stable Diffusion references people have made listing hundreds of artist styles.
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
export default function Talk() { | |
const [modelReady, setModelReady] = useState(false); | |
const [fullModel, setFullModel] = useState(null); | |
const [training, setTraining] = useState(false); | |
const [chat, setChat] = useState(''); | |
// slice book every 2000 characters | |
const bookParts = []; | |
for (let i = 0; i < book.length; i += 2000) { | |
bookParts.push(book.slice(i, i + 2000)); |
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
// ==UserScript== | |
// @name Blur Twitter Timeline | |
// @namespace http://tampermonkey.net/ | |
// @version 2023-12-14 | |
// @description try to take over the world! | |
// @author You | |
// @match https://twitter.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com | |
// @grant none | |
// ==/UserScript== |
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
/** | |
* Converts a flat file structure like: | |
* about.html, features.html, blog.html | |
* into | |
* features/index.html, about/index.html, blog/index.html | |
* Usage: node cleaner.js or node cleaner.js watch | |
*/ | |
const fs = require("fs") |
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 MAX_WIDTH = process.env.PHOTO_MAX_WIDTH || 800; | |
const QUALITY = process.env.PHOTO_QUALITY || 0.9; | |
const readPhoto = async (photo) => { | |
const canvas = document.createElement('canvas'); | |
const img = document.createElement('img'); | |
// create img element from File object | |
img.src = await new Promise((resolve) => { | |
const reader = new FileReader(); |
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
let myObj = { | |
//add an asyncIterator method to my object | |
[Symbol.asyncIterator]() { | |
//which will return an object that contains a method called next() | |
return { | |
i: 0 /* my counter property */, | |
next() { | |
if (this.i < 3) { | |
//return value from the next method must be an object | |
//the object should contain a value and a done property |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
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
https://regex101.com/r/l0m7yh/3 | |
Regex: ^(https?\:\/\/)?(www\.)?(youtube\.com|youtu\.?be)(\/)?(embed\/)?(watch\?v=|\?v=)?(?<video_id>.*)$ | |
Group 7 / 'video_id' includes the video-id | |
Testes with examples like: | |
https://www.youtube.com/watch?v=osz5tVY97dQ | |
https://youtube.com/watch?v=osz5tVY97dQ | |
https://youtube.com/osz5tVY97dQ |
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 Foo { | |
constructor(foo) { | |
this.foo = foo | |
} | |
async execUntilStop(callback) { | |
const timeoutLoopCallback = () => { | |
if (this.stopExec) return; | |
callback({ data: 'data' }); | |
setTimeout(timeoutLoopCallback, 10); |
/*
Made by [egyJs.com](https://www.instagram.com/egyjs/);
*/
install it on your localhost and try it :
NewerOlder