Refs:
- Erick Wendel:
- Partnerships: https://ewbr.cc/mediakit
- My links: https://ewbr.cc/ewinternational
Projects:
- Trimly Barber Assistant: https://ewbr.cc/trimly-code
- Smart chatbot: https://ewbr.cc/codigo-sje09
| Criando agentes de IA no navegador usando JavaScript | |
| Slides: https://ewbr.cc/mvpconf-ew | |
| - Intro | |
| - a forma em que navegamos na web está mudando! | |
| - AI preenchendo form (video nodesource) | |
| - Problema | |
| - custo em AI - tokens caros |
Refs:
Projects:
| const { Worker, isMainThread, parentPort, threadId } = require('worker_threads'); | |
| if (isMainThread) { | |
| const worker = new Worker(__filename); | |
| worker.on('message', (msg) => { | |
| console.log(`${msg}`); | |
| }); | |
| worker.postMessage('main >'); |
| import { Session } from 'inspector/promises'; | |
| import fs from 'fs'; | |
| import net from 'net'; | |
| let session; | |
| const now = new Date(); | |
| const profileFile = `/src/${now.getTime()}.cpuprofile`; | |
| function createTCPServer({ | |
| onStart, |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: app | |
| namespace: default | |
| spec: | |
| selector: | |
| app: app | |
| ports: | |
| - protocol: TCP |
| for i in *.ARW; do sips -s format jpeg $i --out "${i%.*}.jpg"; done |
| INPUT=demo.gif | |
| OUTPUT=demo-1.gif | |
| ffmpeg -hide_banner -v warning -i $INPUT -filter_complex "[0:v] scale=320:-1:flags=lanczos,split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse" $OUTPUT |
| // Sample for reading a file asynchronously using libuv | |
| // taken from https://www.snip2code.com/Snippet/247423/Sample-for-reading-a-file-asynchronously | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <uv.h> | |
| static uv_fs_t openReq; | |
| static uv_fs_t readReq; |
| // I know it's not complete. It was a TDD test I made a few years ago | |
| //index.js | |
| const single = { | |
| 1: 'one', | |
| 2: 'two', | |
| 3: 'three', | |
| 4: 'four', | |
| 5: 'five', | |
| 6: 'six', |
| // @erickwendel_ | |
| import { Readable } from 'node:stream' | |
| import { pipeline } from 'node:stream/promises' | |
| const take = (limit) => async function* (source) { | |
| let count = 0; | |
| for await (const item of source) { | |
| if (count++ >= limit) break | |
| yield item | |
| } |