Skip to content

Instantly share code, notes, and snippets.

View melchisedech333's full-sized avatar
❤️
O amor é o desejo de eternidade do ser amado - Santo Tomás de Aquino

Jessé Romero melchisedech333

❤️
O amor é o desejo de eternidade do ser amado - Santo Tomás de Aquino
View GitHub Profile
lexer grammar TLexer;
@lexer::postinclude {
#ifndef _WIN32
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
}
/* Tokens. */
STRING : '"' .*? '"' ;
@melchisedech333
melchisedech333 / Grammar
Created March 28, 2022 17:45
Gramática
parser grammar TParser;
options {
tokenVocab = TLexer;
}
@parser::postinclude {
#ifndef _WIN32
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
@melchisedech333
melchisedech333 / script.js
Created April 10, 2022 23:27
Extract youtube videos from playlist
var els = document.getElementsByTagName('a');
var urls = [];
for (var a=0; a<els.length; a++) {
var item = els[a].href.toString().trim();
if (item.indexOf('watch') != -1) {
var url = item.split('&');
url = url[0].toString().trim();
var found = false;
@melchisedech333
melchisedech333 / injected.js
Created April 10, 2022 23:32
Download video subtitles
// Configs...
// YouTube video list.
var urls = `
https://www.youtube.com/watch?v=ev9zrt__lec
`;
@melchisedech333
melchisedech333 / script.php
Created April 10, 2022 23:49
Ranking words of file texts
<?php
// Read file contents.
$path = 'texts-youtube/';
$content = '';
if ($handle = opendir($path)) {
while (false !== ($entry = readdir($handle)))
if ($entry != "." && $entry != "..")
$content .= file_get_contents($path . $entry);
@melchisedech333
melchisedech333 / spell.sh
Created August 12, 2022 03:31
Realiza correção de texto por linha de comando.
content=`echo "animak" | aspell -l pt_br pipe --ignore-case --dont-backup --dont-save-repl | sed -n '2p'`; IFS=':'; read -a strarr <<< "$content"; content="${strarr[1]}"; IFS=','; read -a strarr <<< "$content"; content="${strarr[0]}"; content=`echo $content | sed -e 's/^[[:space:]]*//'`; echo "$content"
Nginx:
http://nginx.org/en/docs/http/load_balancing.html
https://harshshah8996.medium.com/configure-nginx-for-a-production-environment-be0e02a3d9e8
https://www.upguard.com/blog/10-tips-for-securing-your-nginx-deployment
https://brain2life.hashnode.dev/nginx-security-101-a-checklist-for-keeping-your-web-server-safe-and-secure
https://steadylearner.medium.com/how-to-deploy-rust-web-application-8c0e81394bd5
https://medium.com/localhost-run/using-nginx-to-host-websockets-and-http-on-the-same-domain-port-d9beefbfa95d
https://websockets.readthedocs.io/en/stable/howto/nginx.html
https://www.nginx.com/blog/websocket-nginx/