Skip to content

Instantly share code, notes, and snippets.

View fabricedge's full-sized avatar

fabricedge

  • Brazil
  • 18:08 (UTC -03:00)
View GitHub Profile
import psycopg2
from psycopg2.extras import execute_values
from urllib.parse import urlparse
def copy_table(source_url, dest_url, table_name):
# Conecta nas duas bases
src_conn = psycopg2.connect(source_url)
dst_conn = psycopg2.connect(dest_url)
defmodule JhetwoWeb.HeaderCreatorComponent do
use Phoenix.LiveComponent
#@use JhetwoWeb, :html
def mount(_params, _uri, socket) do
user = if socket.assigns.current_user do
socket.assigns.current_user
else
nil
end