- Configurar chave SSH
- Criar Droplet
- Realizar update e upgrade
- Crua usuário
adduser deployeusermod -aG sudo deploy - Cria pasta
.sshprodeploy cp ~/.ssh/authorized_keys /home/deploy/.ssh/authorized_keyschown -R deploy:deploy .ssh/chmod 700 .ssh
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
| import javax.crypto.Cipher; | |
| import java.io.InputStream; | |
| import java.security.*; | |
| import java.util.Base64; | |
| import static java.nio.charset.StandardCharsets.UTF_8; | |
| public class RsaExample { | |
| public static KeyPair generateKeyPair() throws Exception { | |
| KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); |
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
| var startValue = '0.00000001', // Don't lower the decimal point more than 4x of current balance | |
| stopPercentage = 0.001, // In %. I wouldn't recommend going past 0.08 | |
| maxWait = 500, // In milliseconds | |
| stopped = false, | |
| stopBefore = 1; // In minutes for timer before stopping redirect on webpage | |
| var $loButton = $('#double_your_btc_bet_lo_button'), | |
| $hiButton = $('#double_your_btc_bet_hi_button'); |
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 | |
| /** | |
| * Draw a rectangle with rounded corners. | |
| * @param ressource &$img An image resource | |
| * @param int $x1 Upper left x coordinate | |
| * @param int $y1 Upper left y coordinate | |
| * @param int $x2 Bottom right x coordinate | |
| * @param int $y2 Bottom right y coordinate | |
| * @param int $r Corners radius | |
| * @param int $color A color identifier created with imagecolorallocate() |
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 | |
| # The following steps, which were tested on Ubuntu 18.04 LTS and on the Ubuntu-powered Linux for Windows Subsystem on Windows, | |
| # will: | |
| # | |
| # * Compile a recent version of OpenSSL (you can skip this step and use your package maintainer's version if you prefer, but you | |
| # might have to tweak a few bits) | |
| # * Create a separate set of configuration files suitable for configuring a basic CA capable of signing EV certificates | |
| # * Create such a CA (hackerca.local / HackerCA EV Root CA) | |
| # * Create a certificate request for a site, hackersite.local, belonging to company "Barclays PLC [GB]" |
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
Ambiente de desenvolvimento rápido da Web, baseado na estrutura [Slim] (https://www.slimframework.com)
- Com base na estrutura [Slim] (https://www.slimframework.com)
- Biblioteca de gerenciamento de modelos [Twig] (https://twig.symfony.com)
- Gerenciamento de banco de dados com a biblioteca [Eloquent ORM] (https://laravel.com/docs/5.7/eloquent)
- Gerenciamento de correio com a biblioteca [Swift Mailer] (https://swiftmailer.symfony.com)
- Manipulação de data e hora com a biblioteca [Carbon] (https://carbon.nesbot.com)
- Gerenciamento do sistema de arquivos com a biblioteca [Filesystem] (https://github.com/symfony/filesystem)
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
| Header set Access-Control-Allow-Origin "*" |