Skip to content

Instantly share code, notes, and snippets.

View joeldatabox's full-sized avatar

Joel Rodrigues Moreira joeldatabox

View GitHub Profile
@joeldatabox
joeldatabox / Backup-and-Restore-GPG-and-SSH-keys.md
Created August 27, 2024 14:53 — forked from colematt/Backup-and-Restore-GPG-and-SSH-keys.md
[Backup and Restore GPG and SSH keys] #git #gpg #ssh

Backup

  1. Copy both id_rsa and id_rsa.pub from ~/.ssh/ to a USB drive. Identify the private key by executing the following command.
    gpg --list-secret-keys --keyid-format LONG
    
  2. It will show something similar to this.
    sec   4096R/3AA5C34371567BD2 2016-03-10 [expires: 2017-03-10]
    
public class Dialog<T> {
protected void openDialogModal(String dialog) {
Map<String, Object> options = new HashMap<>();
options.put("modal", true);
options.put("draggable", false);
options.put("responsive", true);
options.put("resizable", false);
options.put("contentHeight", 600);
options.put("contentWidth", 800);
RequestContext.getCurrentInstance().openDialog(dialog, options, null);
@ViewScoped
@Named("empresaController")
public class EmpresaController extends Dialog<Empresa> implements Serializable {
private Empresa empresaSelecionada;
@Inject
private UserController userController;
@Inject
@RepositoryCDI(EnumModel.EMPRESA)
private RepositoryEmpresa<Empresa> empresaRepository;
<p:dialog id="empresaDialog" widgetVar="empresaDialog" responsive="true" resizable="false" draggable="false" modal="true"
header="Selecione uma empresa">
<div class="ui-fluid" style=" max-width: 800px">
<h:form>
<p:dataTable var="item" value="#{empresaController.empresas}">
<p:column headerText="CNPJ" priority="1" width="130">
<h:outputText value="#{item.cnpj}"/>
</p:column>
<p:column headerText="Nome">
<h:outputText value="#{item.nome}"/>
package br.ueg.programacaoi;
import java.util.Scanner;
public class Matriz {
Scanner sc;
int mat[][];
int matT[][];