Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| #!/usr/bin/env bash | |
| # @example | |
| # chmod a+x randommac.sh | |
| # ./randommac.sh wlp2s0 | |
| # @credits original macOS / osX version via @rem | |
| # https://remysharp.com/2017/05/29/getting-free-wifi | |
| if [ "$1" != "" ]; then |
| license: mit |
| license: mit |
| license: mit |
| <?php | |
| /** | |
| * simple method to encrypt or decrypt a plain text string | |
| * initialization vector(IV) has to be the same when encrypting and decrypting | |
| * | |
| * @param string $action: can be 'encrypt' or 'decrypt' | |
| * @param string $string: string to encrypt or decrypt | |
| * | |
| * @return string | |
| */ |
| <?php | |
| // Server file | |
| class PushNotifications { | |
| // (Android)API access key from Google API's Console. | |
| private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
| // (iOS) Private key's passphrase. | |
| private static $passphrase = 'joashp'; | |
| // (Windows Phone 8) The name of our push channel. | |
| private static $channelName = "joashp"; |
openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
Demonstrates chart generation on both server side (top chart) using node.js and client side (bottom chart).
Note: For the purpose of this example and not having node.js available servers side, chart.svg has been pre generated using instructions for this project:
npm install
node index.js > chart.svg| <?php | |
| // The URL where the test-auth.php script resides. | |
| define("POST_DATA_TO_URL", "http://someurl/my-script.php"); | |
| // Function to send value to my-script.php script via cURL with digest authentication. | |
| function submitValue($myValue) { | |
| $ch = curl_init(POST_DATA_TO_URL); | |
| curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); | |
| curl_setopt($ch, CURLOPT_USERPWD, "admin:mypass"); |