style and rlimit

This commit is contained in:
Sergio Álvarez 2021-10-15 20:59:01 +02:00
parent 882f1d970b
commit ee7b861ba8
4 changed files with 9 additions and 6 deletions

View File

@ -1,5 +1,5 @@
Simpler than the mechanism of a spoon. Simpler than the mechanism of a spoon.
Local testing: `php -S localhost:8000` Local testing: `php -S localhost:8000 -t app/public`
Docker run: `docker-compose up` Docker run: `docker-compose up`

View File

@ -15,7 +15,7 @@ footer {
} }
textarea { textarea {
height: 88vh; height: 93vh;
font-family: monospace; font-family: monospace;
} }

View File

@ -150,16 +150,14 @@ if ($plain) {
<?php } ?> <?php } ?>
<a href="/" role="button" class="secondary">Reset</a> <a href="/" role="button" class="secondary">Reset</a>
<a href="<?=$help?>" role="button" class="secondary">Help</a> <a href="<?=$help?>" role="button" class="secondary">Help</a>
<hr />
<p><small>Contact me via <a href="mailto:correo@sergio.am">email</a> or <a href="https://twitter.com/xergio">twitter</a>. Made with pure <a href="https://php.net/">PHP</a> and <a href="https://picocss.com/"><strong>Pico</strong>.css</a>. <a href="https://sergio.am/code/dencode.xrg.es">Source code</a>.</small></p>
</div> </div>
<div> <div>
<textarea name="str" class="form-input" placeholder="Paste a string here"><?=htmlentities($result, ENT_QUOTES | ENT_HTML5 | ENT_IGNORE)?></textarea> <textarea name="str" class="form-input" placeholder="Paste a string here"><?=htmlentities($result, ENT_QUOTES | ENT_HTML5 | ENT_IGNORE)?></textarea>
</div> </div>
</main> </main>
<footer>
<small>Contact me via <a href="mailto:correo@sergio.am">email</a> or <a href="https://twitter.com/xergio">twitter</a>. Made with pure <a href="https://php.net/">PHP</a> and <a href="https://picocss.com/"><strong>Pico</strong>.css</a>. <a href="https://sergio.am/code/dencode.xrg.es">Code</a>.</small>
</footer>
</form> </form>
</body> </body>
</html> </html>

View File

@ -1,3 +1,6 @@
limit_req_zone $binary_remote_addr zone=rlimit:10m rate=5r/s;
server { server {
index index.html index.php; index index.html index.php;
#server_name phpfpm.local; #server_name phpfpm.local;
@ -5,6 +8,8 @@ server {
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
root /var/www/html/public; root /var/www/html/public;
limit_req zone=rlimit;
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;