$ find -type f -name \*gpg -exec gpg --batch --passphrase Fe8OuveaNiR1afeel7ietahzeigaevin {} \;
Teste de desempenho em rede TCP/IP
Serão considerando dois Hosts (A e B) durante a realização deste teste. O objetivo deste teste é medir a taxa de transferência capaz de ser atingida pela conectividade que une estes dois Hosts.
Sera necessário instalar o utilitário netcat no Host A e no Host B, para isto execute o seguinte comando (como usuário administrador/root) em cada um dos hosts:
# apt install netcat-traditional
Execute no Host A (IPv4 192.168.0.1):
$ nc -l -p 12345
Execute no Host B (IPv4 192.168.0.2):
$ dd if=/dev/zero | nc 192.168.0.1 12345
Após executar o comando no Host B, aguarde ao menos de 1 a 2 minutos e realize um CTRL+C no Host B.
Resultado no Host B, após 3 minutos:
4053175+0 registros de entrada 4053174+0 registros de saída 2075225088 bytes (2,1 GB) copiados, 182,638 s, 11,4 MB/s
A taxa de transferência obtida durante este teste foi de 11,4 MB/s.
Construindo sensor segue linha para robótica usando sensor óptico reflexivo TRCT5000
Cor | Ligação |
---|---|
Laranja | 5V (inicio) |
Verde | 5V (continuação) |
Cinza | GND (inicio) |
Preto | GND (continuação) |
Amarelo | saida do sensor |
Saida do sensor indica valor de cor entre branco e preto. Caso usado como sinal digital, apenas valor binario preto ou branco mas se usado como sinal analógico variações entre branco e preto.
Resistor | Resistência | Detalhe |
---|---|---|
R1 | 330R (laranja, laranja, marrom) | |
R2 | 10KR (marrom, preto, laranja) | Define sensibilidade do sensor, detalhes veja na referencia zerokol ou datasheet |
Referencias:
Roteadores compatíveis com OpenWrt
- OpenWrt – ToH special: Gbit, Dualband, 802.11ac, OpenWrt supported
https://wiki.openwrt.org/toh/views/toh_special_gbit_dualband - OpenWrt – Buyers’ Guide
https://wiki.openwrt.org/toh/buyerguide - Linksys WRT1900AC v2
https://wikidevi.com/wiki/Linksys_WRT1900AC_v2
Building Application with PHP and Google Big Query
This article shows the recommended way to authenticate to a Cloud API.
This page provides a short exercise in building a simple command-line application (in C#, Go, Java, Node.js, PHP, Python, or Ruby) with the Google BigQuery API. This simple application will run a query on one of the available Sample Datasets and display the result.
This page shows how to get started with the new Cloud Client Libraries for the Google BigQuery API. Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.
API Google Cloud BigQuery allows you to create, manage, share and query data.
BigQuery And PHP QuickStart Sample
Google Cloud – Creating a service account
Create a service account at:
https://console.developers.google.com/iam-admin/
Next, run the command to active account:
# gcloud auth activate-service-account --key-file="my_key_file.json"
Referencias:
- https://developers.google.com/identity/protocols/OAuth2ServiceAccount
Google Cloud Storage – bucket permissions
At Google Cloud Console, follow this steps:
- Storage
- Browser
- If there is not a bucket yet, create a new bucket
- Edit bucket permissions at button “…”
- Step 3 show a left panel with a tab permission, at this tab use “add members”
- Add a member with role “Storage Legacy Bucket Owner” to FULL ACCESS this bucket
- If there is not a service account yet, read this post
Simples teste de carga em servidor web usando ab (Apache Benchmark)
Será usada a ferramenta ab (Apache Benchmark) para realizar este teste.
$ ab -c 20000 -n 30000 http://kingisnaked/
Caso encontre erro no limite de arquivos disponíveis, como aparece abaixo
socket: Too many open files (24)
Execute os seguintes comandos:
$ echo 400000 > /proc/sys/fs/file-max
$ ulimit -n 400000
DIY/Hack substituindo memoria de um dispositivo Sonoff/ESP8266
- Modulo Sonoff Básico
- https://www.itead.cc/sonoff-wifi-wireless-switch.html
- Modulo Sonoff Temperatura/Humidade
- https://www.itead.cc/smart-home/sonoff-th.html
- HowTo uso de six sonoff e modificações em memoria
- http://www.superhouse.tv/21-six-sonoff-secrets/
- HowTo/Doc sobre modificações em memoria sonoff/ESP8266
- 32Mb ESP01 and Sonoff
- http://tech.scargill.net/32mb-esp01/
- Software de implementação Sonoff-Tasmota [Melhor?]
- Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE
- https://github.com/arendst/Sonoff-Tasmota
- Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE
- Software de implementação Sonoff-MQTT-OTA-Arduino
- https://github.com/arendst/Sonoff-MQTT-OTA-Arduino
Convertendo chave PGP do repositório APT do MySQL
Acesse a seguinte pagina e copie a chave publica do MySQL.
https://dev.mysql.com/doc/refman/5.7/en/checking-gpg-signature.html
Salve a chave em um arquivo com o seguinte nome: mysql-pubkey.asc
Agora importe esta chave PGP para dentro do utilitário gnupg, para isto execute o seguinte comando:
$ gpg --import mysql-pubkey.asc
Agora exporte o keyring usando o seguinte comando:
$ gpg --export 5072E1F5 > mysql-keyring.pgp