This file contains 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
RBC WaterPark Workshop - 10/02/2020 | |
Openshift Master Console: http://console-openshift-console.apps.cluster-yyz-3dca.yyz-3dca.example.opentlc.com | |
Openshift API for command line 'oc' client: https://api.cluster-yyz-3dca.yyz-3dca.example.opentlc.com:6443 | |
Download oc client from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.3.0/openshift-client-linux-4.3.0.tar.gz | |
You can choose any combination of username/password on the first time you login. |
This file contains 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
Verifying that +yanaga is my blockchain ID. https://onename.com/yanaga |
This file contains 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
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
cat << EOF | sudo tee -a /etc/fstab | |
/swapfile none swap sw 0 0 | |
EOF |
This file contains 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
expect -c ' | |
set timeout -1; | |
spawn android - update sdk --no-ui --all; | |
expect { | |
"Do you accept the license" { exp_send "y\r" ; exp_continue } | |
eof | |
} | |
' |
This file contains 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 java.io.Serializable; | |
import java.util.List; | |
import javax.persistence.EntityManager; | |
import org.springframework.data.domain.Page; | |
import org.springframework.data.domain.Pageable; | |
import org.springframework.data.domain.Sort; | |
import org.springframework.data.jpa.domain.Specification; | |
import org.springframework.data.jpa.repository.support.JpaEntityInformation; |
This file contains 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 java.io.Serializable; | |
import javax.persistence.EntityManager; | |
import org.springframework.data.jpa.repository.JpaRepository; | |
import org.springframework.data.jpa.repository.support.JpaEntityInformation; | |
import org.springframework.data.jpa.repository.support.JpaRepositoryFactory; | |
import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean; | |
import org.springframework.data.repository.core.RepositoryMetadata; | |
import org.springframework.data.repository.core.support.RepositoryFactorySupport; |
This file contains 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
cat << EOF | sudo tee /etc/network/interfaces | |
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
allow-hotplug wlan0 | |
auto wlan0 | |
iface wlan0 inet dhcp | |
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf |
This file contains 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
O Receitanet é utilizado para transmitir vários tipos de declarações diferenes, tanto para pessoas físicas quanto jurídicas. Torná-lo um programa separado ao invés de um módulo permite atualizá-lo de modo separado. | |
Mas isto não é um motivo forte o suficiente para torná-lo um programa separado ao invés de um módulo ou biblioteca. | |
Boa parte das declarações permite que retificações sejam enviadas durante um período de 5 anos. O Receitanet valida os certificados digitais dos servidores da receita durante a transmissão. Durante este período caso algum certificado digital fosse expirado ou revogado, seria necessário atualizar também os programas que fazem a declaração (o que provavelmente o pessoal do Serpro não gostaria). Caso tal situação ocorra, basta fazer a declaração no programa sem modificações e enviar a partir do Receitanet atualizado. |
This file contains 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
<?xml version="1.0"?> | |
<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd" | |
version="2.0"> | |
<namespace>http://www.springframework.org/security/tags</namespace> | |
<tag> | |
<tag-name>authorize</tag-name> | |
<handler-class>org.springframework.faces.security.FaceletsAuthorizeTagHandler</handler-class> | |
</tag> | |
<function> |
This file contains 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
public boolean isValid(String s) { | |
if (s.matches("[1-2]\\d{10}00[0-1]\\d") || s.matches("[7-9]\\d{14}")) { | |
return somaPonderada(s) % 11 == 0; | |
} | |
return false; | |
} | |
private int somaPonderada(String s) { | |
char[] cs = s.toCharArray(); | |
int soma = 0; |
NewerOlder