$ docker
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
| #!/bin/bash | |
| # Author: ABM Ruman <abm.ruman@gmail.com> | |
| # Substitute for `php artisan key:generate` in lumen (requires a 32bit string as APP_KEY) | |
| # Copy `.env.example` to `.env` first, if you havn't already. | |
| # Generates 32bit pseudo-random alphaneumaric string (https://gist.github.com/earthgecko/3089509) | |
| # and replaces it with APP_KEY value | |
| # Note: this regular expression is for testing alphaneumaric string only, it will not work with Laravel, |
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
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
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
| #include <stdio.h> | |
| int main () { | |
| char ch='c'; | |
| printf("Press 'Esc' or 'Ctrl+C' to stop.\n"); | |
| while (ch != 27) | |
| printf ("(%d) ",ch = getche()); | |
| return 0; | |
| } |