Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View codingdudecom's full-sized avatar

codingdudecom

View GitHub Profile
@codingdudecom
codingdudecom / e-e-a-t-ai-audit.js
Last active April 20, 2024 12:50
E-E-A-T AI Audit
function start(){
var script = document.createElement("script");
script.onload = () => doTask();
script.src = "https://unpkg.com/turndown/dist/turndown.js";
document.head.appendChild(script);
}
function doTask(){
var turndownService = new TurndownService();
@codingdudecom
codingdudecom / ChatGPT Stable Diffusion prompts generator.txt
Last active April 16, 2024 02:39 — forked from bluelovers/ChatGPT Stable Diffusion prompts generator.txt
using ChatGPT as Stable Diffusion prompts generator
Stable Diffusion XL is an AI art generation model similar to DALLE-2.
A prompt should follow the following template:
[medium] of a [subject] [action performed by subject] [description of the subject] [lighting details and other artistic details] [by artist] [in X style]
medium can be either of photo, digital painting, illustration, painting, 3d render
Additionally you can add the words "by [artist]" where artist is a famous artist name (especially for digital paintings or illustrations); These can be a combination of multiple artists.
@codingdudecom
codingdudecom / nlp.py
Created November 1, 2023 06:23
NLP Python code
from js import fetch
import nltk
from nltk.util import ngrams
from pathlib import Path
import os, sys, io, zipfile
stopwords = "i,me,my,myself,we,our,ours,ourselves,you,your,yours,yourself,yourselves,he,him,his,himself,she,her,hers,herself,it,its,itself,they,them,their,theirs,themselves,what,which,who,whom,this,that,these,those,am,is,are,was,were,be,been,being,have,has,had,having,do,does,did,doing,a,an,the,and,but,if,or,because,as,until,while,of,at,by,for,with,about,against,between,into,through,during,before,after,above,below,to,from,up,down,in,out,on,off,over,under,again,further,then,once,here,there,when,where,why,how,all,any,both,each,few,more,most,other,some,such,no,nor,not,only,own,same,so,than,too,very,s,t,can,will,just,don,should,now"
stopwords = stopwords.split(",")
punkt_downloaded = False

Online Photo Editing - FabricJS Masking

A while ago I tried implementing a photo mask tool in MockoFun which is based on FabricJS

Check out an working example: https://jsfiddle.net/codingdude/sk84xLh2/

The solution I came up was combining the built in fabric.Image.filters.BlendImage filter with a custom FabricJS brush. Here's a glimpse at my implementation of that.

(function(){
@codingdudecom
codingdudecom / curved-text-generator-js.markdown
Created November 18, 2020 12:01
Curved Text Generator JS

Curved Text Generator JS

JS function to generate curved text from a HTML text element. This technique make a span element for each letter and rotates it slightly. Generate a circle text by adjusting the font site and circle radius.

Check out MockoFun Online: curved text generator

A Pen by Ion Emil Negoita on CodePen.

License.

@codingdudecom
codingdudecom / 80s-fonts-text-effect-1-80s-chrome-text.markdown
Last active May 25, 2023 20:18
80s Fonts Text Effect 1: 80s Chrome Text
@codingdudecom
codingdudecom / 80s-fonts-text-effect-10-css-stranger-things-text-effect.markdown
Created July 22, 2019 12:05
80s Fonts Text Effect 10: CSS Stranger Things Text Effect
@codingdudecom
codingdudecom / css-star-5-pointed-star.markdown
Created October 6, 2021 13:23
CSS Star: 5 Pointed Star ★

Star Copy and Paste Characters & Symbols

See a complete list of star symbols, star characters, star emojis and other star copy and paste useful information.

@codingdudecom
codingdudecom / css-star-6-pointed-star.markdown
Created October 7, 2021 12:40
CSS Star: 6 Pointed Star ✶