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
| <?php | |
| $key = 'your-secret-key-here'; | |
| $header = [ | |
| 'typ' => 'JWT', | |
| 'alg' => 'HS256' | |
| ]; | |
| $header = json_encode($header); | |
| $header = base64_encode($header); |
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
| Entendendo as permissões | |
| Usa-se muito o chmod e pouco fala-se dele. | |
| Muitas vezes a pessoa não sabe o que está fazendo quando dá uma permissão 777 ou 455 para um arquivo. Vou explicar mais a fundo o funcionamento do chmod. | |
| Um 'ls -la' no Linux tem o seguinte output: | |
| drwxr-xr-x 2 root root 4096 Set 22 10:08 temp | |
| -rwxrwxr-x 1 garcia garcia 1088 Jul 5 16:17 torpedo | |
| -rw-rw-r-- 1 garcia garcia 18283 Ago 3 13:10 videoteca.tar.gz |