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
  • Stone Co
  • Mom's basement
View GitHub Profile
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/
@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"
@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 / 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.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 / 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
lexer grammar TLexer;
@lexer::postinclude {
#ifndef _WIN32
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
}
/* Tokens. */
STRING : '"' .*? '"' ;
@melchisedech333
melchisedech333 / main.cpp
Created March 28, 2022 17:41
Acessando elementos dos sub-níveis da ASY
#include <iostream>
#include "antlr4-runtime.h"
#include "TLexer.h"
#include "TParser.h"
#include "TParserBaseVisitor.h"
using namespace antlrcpptest;
using namespace antlr4;
@melchisedech333
melchisedech333 / code.y
Created March 27, 2022 05:16
Yacc da análise dos arrays.
%{
#include <stdio.h>
#include <string.h>
void yyerror (char *c);
int yylex (void);
%}
%union {
char *value;
@melchisedech333
melchisedech333 / code.l
Created March 27, 2022 05:15
Lexer da análise dos arrays
%{
#include <stdio.h>
#include <string.h>
#include "y.tab.h"
void yyerror (char *c);
%}
CHARS [a-zA-Z0-9]+
STRING \"{CHARS}\"