This is a guide to using pyjwt to sign and validate a JWT using
RS256.
The trickiest part of doing this is knowing what the proper OpenSSL commands are to generate the RSA keypair. I demonstrate that below.
| git config --global alias.lola "log --graph --decorate --pretty=oneline --abbrev-commit --all" |
| # To be inside the /Directory | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.html$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.html [L] | |
| </IfModule> |
| s_id=`curl -X POST http://127.0.0.1:4444/wd/hub/session -d '{"desiredCapabilities":{"browserName":"firefox","platform":"MAC"}}'|awk -F'"' '{print $6}'` | |
| curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/url -d '{"url":"http://www.google.com"}' | |
| curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element -d '{"using":"id","value":"gbqfq"}' | |
| curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element/0/value -d {"value":["selenium"]} | |
| curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element -d '{"using":"id","value":"gbqfb"}' | |
| curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element/1/click | |
| curl -X DELETE http://127.0.0.1:4444/wd/hub/session/$s_id/window |
| VAGRANT_HTTP_PROXY=$HTTP_PROXY | |
| VAGRANT_HTTPS_PROXY=$HTTPS_PROXY | |
| VAGRANT_NO_PROXY=$NO_PROXY |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).
| <?php | |
| define('T', ' '); | |
| define('N', PHP_EOL); | |
| $functions = array(); | |
| $classes = array(); | |
| $constant_prefix = 'X_'; | |
| $php = '<?php' . N; |
| #!/bin/bash | |
| for file in `find .` | |
| do | |
| EXTENSION="${file##*.}" | |
| if [ "$EXTENSION" == "php" ] || [ "$EXTENSION" == "phtml" ] | |
| then | |
| RESULTS=`php -l $file` |
| mr Marathi | |
| bs Bosnian | |
| ee_TG Ewe (Togo) | |
| ms Malay | |
| kam_KE Kamba (Kenya) | |
| mt Maltese | |
| ha Hausa | |
| es_HN Spanish (Honduras) | |
| ml_IN Malayalam (India) | |
| ro_MD Romanian (Moldova) |