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
import { useCallback, useEffect, useRef, useState } from "react"; | |
/** | |
* Custom React hook for double-click confirmation for critical actions. | |
* | |
* @param action - The action to be executed on the second click. | |
* @param timeout - Time in milliseconds to reset the unlocked state. | |
* @returns The current unlocked state and the trigger function. | |
*/ | |
const useConfirmation = (action: () => void, timeout: number = 5000) => { |
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
import requests,urllib3, sys | |
from bs4 import BeautifulSoup | |
if len(sys.argv) < 3: | |
print('Usage: python registrocivil.py run docType docNumber') | |
sys.exit('ex: python registrocivil.py 11111111-K CEDULA 10600000') | |
URL="https://portal.sidiv.registrocivil.cl/usuarios-portal/pages/DocumentRequestStatus.xhtml" | |
headers={"Content-Type":"application/x-www-form-urlencoded", | |
"User-Agent":"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"} |