Skip to content

Instantly share code, notes, and snippets.

@vineboneto
vineboneto / smtp_login_auth.go
Created May 16, 2025 17:25 — forked from andelf/smtp_login_auth.go
golang net/smtp SMTP AUTH LOGIN Auth Handler
// MIT license (c) andelf 2013
import (
"net/smtp"
"errors"
)
type loginAuth struct {
username, password string
import postgres from "postgres";
import { fakerPT_PT as faker } from "@faker-js/faker";
const sql = postgres({
user: "postgres",
host: "localhost",
port: 5432,
pass: "1234",
});

Deploy na aws

Criação de usuário

  • Criar usuário
    • sudo adduser <your_user>
  • Dar direitos de sudo ao usuário
    • sudo usermod -aG sudo <your_user>
  • Conectar ao usuário
    • sudo su - <your_user>
import subprocess
import os
# cowboy bebop
# samurai champloo
# monster
# death note
# berserk
# bakemonogatari
type ErrorBase<R = any> = {
error: string;
info?: R;
[key: string]: any; // Permite outras propriedades opcionais
};
export type Result<T, R = any> = SuccessResult<T> | FailureResult<R>;
interface SuccessResult<T> {
error: null;
import multiprocessing
import queue
import time
import sys
import schedule
def job(task_id, q):
print(f"Process: {task_id}")
total = range(10)
import threading
import queue
import time
import sys
import schedule
def job(task_id, q):
print(f"Thread: {task_id}")
total = range(10)
using QuestPDF.Fluent;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
using QuestPDF.Previewer;
QuestPDF.Settings.License = LicenseType.Community;
// code in your main method
Document.Create(container =>
{
import posgtres from "postgres";
import fs from "fs";
import { Readable, Transform } from "stream";
const sql = posgtres({
host: "localhost",
user: "postgres",
password: "1234",
port: 5432,
});
@vineboneto
vineboneto / main.py
Last active January 18, 2024 15:04
Real-ESRGAN for Anime Video Enhancement
# https://github.com/xinntao/Real-ESRGAN
# Install ffmpeg version 6.1.1-full_build-www.gyan.dev
# Download Real-ESRGAN-ncnn-vulkan and put it in the same folder as this script
# Create a folder called animes and put all your videos there
# Create a folder called animes_out
# Run this script
import os
import glob
import subprocess