-
- Sempre buscar pela documentação oficial, este documento é um tutorial
que pode não te atender conforme tenha novas atualizações do processo de instalação. - As referências estão no final do documento.
- Sempre buscar pela documentação oficial, este documento é um tutorial
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/sh | |
| sudo apt-get update && apt-get upgrade | |
| sudo apt-get install php | |
| sudo apt-get install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php | |
| EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)" | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" |
I recently had the following problem:
- From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
- That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
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 | |
| /** | |
| This is a simple proof of concept of a brute force algorithm for string matching with | |
| given set of characters. | |
| The way this works is that the algorithm counts from first to last possible combination of | |
| given characters. Instead of counting(incrementing) in number base 10 we use | |
| a new base which is derived from your set of possible characters (we count in symbols). | |
| So if your characters list contains 27 characters the program actually counts in a 27 base | |
| number system. |