Snippets Collections
 sudo du -ah / --exclude=/proc --exclude=/sys --exclude=/dev --exclude=/home/virtfs | sort -rh | head -n 20
import axios, { AxiosError } from 'axios';

// Crea una instancia de Axios
const instance = axios.create({
  baseURL: '',
  // Aquí puedes añadir más configuraciones si es necesario

// Simula un error 503 en todas las respuestas utilizando un interceptor
  response => {
    // Crea un error de Axios simulado
    const axiosError = new AxiosError(
      "Service Unavailable", // mensaje de error
      "ECONNABORTED", // código de error, este es un ejemplo, puede ajustarlo según sea necesario
      undefined, // config, puedes añadir la configuración de la solicitud aquí si es necesario
      undefined, // request, puedes añadir la solicitud aquí si es necesario
      { // response, aquí construyes la respuesta simulada
        status: 503,
        statusText: 'Service Unavailable',
        headers: response.headers,
        config: response.config,
        data: 'Service Unavailable'

    // Rechaza la promesa con el error de Axios simulado
    return Promise.reject(axiosError);
  error => {
    // Este bloque maneja errores reales de las peticiones
    return Promise.reject(error);

export const extractName = async (
  text: TExtractNamePayload
): Promise<{ data: TExtractNameResponse; status: number }> => {
  instance.defaults.headers['Authorization'] = `Bearer ${process.env.EXPO_PUBLIC_SERVER_SECRET_KEY}`;
  try {
    const response = await<TExtractNameResponse>('/api/v1/conversation/entity-extraction/names', text);
    return { data:, status: response.status };
  } catch (error) {
    if (axios.isAxiosError(error)) {
      // Aquí capturas el error simulado o real y lo devuelves
      return { data: error.response?.data, status: error.response?.status };
    // Manejo de otros tipos de errores
    throw error;
> eval `ssh-agent`
> ssh-add /c/Users/roberto/.ssh/gitlab
#create an identity fil name {mycert} as per your need
ssh-keygen -f ~/.ssh/mycert -t ed25519

Host myserver
Hostname {hostname}
IdentityFile ~/.ssh/{identityFile}
User {username}

#from the console
ssh myserver
type $env:USERPROFILE\.ssh\ | ssh {IP-ADDRESS-OR-FQDN} "cat >> .ssh/authorized_keys"
Host My-Application-Name-or-project-name
    HostName XX.XXX.XXX.XX
    User ubuntu   # user name of machine to login/ssh
    IdentityFile C:\Users\JOHN\.ssh\mykeypair.pem
ssh -i mykeypair_openssh.ppk <user>@<host ip>
# with port
ssh -i mykeypair_openssh.ppk <user>@<host ip> -P 50055
puttygen ~/.ssh/my.ppk -O private-openssh -o ~/.ssh/my_openssh.ppk
#Send/Copy local file to Remote Machine
usage: scp -i <pemfile>  <filename> user-name@domain-or-ip:<path-to-copy>
scp -i .\keys.pem .\<filename> ubuntu@xx.xx.xx.xx:~/  

# copy file from remote machine to local machine (using GIT Bash)
#$scp -i <"pemfile"> user@xx.xx.xx.xx:/<path-of-file-to-copy> <directory-to-paste-file>
$ scp -i  "Light.pem"  bitnami@XX.XX.XX.XX:/home/bitnami/AOC_PROJ_UPDATED_08_06_2022/AOC_PROJ_UPD_08_06_22.tar.gz  . 
#ssh to remote machine.
ssh -i keys.pem ubuntu@xx.xx.xx.xx
# ssh-copy-id takes care of adding your key in the right place

ssh-copy-id -i " -p2222"

# If you don't use -i all of your public keys will be copied over.
# Also a alias for the host can be used if configured in your ssh config.

# You will be asked for the password and after that all should be taken care of.
# Test key if neccessary
ssh -i ~/.ssh/ user@hostname

# Copy key over to server
ssh-copy-id [user@]hostname

# You can also just print out the key as dry run
ssh-copy-id -n [user@]hostname
ssh -i /Users/iliasdh/.ssh/nesk_vision iliasdh@

Mon Mar 25 2024 23:11:11 GMT+0000 (Coordinated Universal Time)

#ssh #git #github #gitlab

Tue Mar 19 2024 22:15:26 GMT+0000 (Coordinated Universal Time)

#ssh #git #github #gitlab

Thu Jan 25 2024 18:19:15 GMT+0000 (Coordinated Universal Time)

#ssh #git #github #gitlab

Fri Mar 03 2023 08:13:54 GMT+0000 (Coordinated Universal Time)

#ssh #linux #identity

Sun Feb 05 2023 10:29:19 GMT+0000 (Coordinated Universal Time)

#powershell #ssh

Thu Sep 22 2022 02:03:37 GMT+0000 (Coordinated Universal Time) undefined

#ssh #vm #security #server

Mon Aug 22 2022 14:31:01 GMT+0000 (Coordinated Universal Time)

#apache-spark #vs-code #ssh #ssh-from-vs-code

Tue Mar 15 2022 04:10:40 GMT+0000 (Coordinated Universal Time)

#ubuntu #bash #ssh

Tue Mar 15 2022 03:32:29 GMT+0000 (Coordinated Universal Time)

#ubuntu #bash #ssh

Wed Feb 09 2022 13:38:38 GMT+0000 (Coordinated Universal Time)

#linux #ssh

Wed Feb 09 2022 13:32:52 GMT+0000 (Coordinated Universal Time)

#linux #ssh

Wed Feb 02 2022 21:24:13 GMT+0000 (Coordinated Universal Time)

#docker #ssh

Mon Jun 21 2021 10:21:52 GMT+0000 (Coordinated Universal Time)

#ssh #server #authentification #network

Wed Jun 09 2021 12:30:24 GMT+0000 (Coordinated Universal Time)


Wed Jun 09 2021 12:24:26 GMT+0000 (Coordinated Universal Time)


Tue Jan 19 2021 14:08:10 GMT+0000 (Coordinated Universal Time)

#cloud #ssh

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension