Skip to content

Instantly share code, notes, and snippets.

View Tonel's full-sized avatar

Antonello Zanini Tonel

View GitHub Profile
const array1 = [];
// adding 100k elements to array1
for (let i = 0; i < 150000; i++) {
array1.push(i);
}
// creating a copy of the array1 variable
const array2 = [];
Array.prototype.push.apply(array2, array1);
const array1 = [];
// adding 100k elements to array1
for (let i = 0; i < 500000; i++) {
array1.push(i);
}
// creating a copy of the array1 variable
const array2 = [];
array2.push(...array1);
client_max_body_size 10M;
location /uploads {
# ...
client_max_body_size 10M;
}
server {
# ...
client_max_body_size 10M;
}
http {
# ...
client_max_body_size 10M;
}
@Tonel
Tonel / index.js
Last active August 20, 2022 03:36
// index.js or server.js
const express = require("express")
// ...
const app = express()
// ...
<?
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, "https://www.w3schools.com/jquery/demo_test_post.asp");
// specify that the cURL request is a POST
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
// define the body of the request
curl_setopt($curl, CURLOPT_POSTFIELDS,
// http_build_query is required to simulate
<?
$from = null;
$to = null;
if (isset($_GET["from"]) && is_numeric($_GET["from"])) {
$from = $_GET["from"];
}
if (isset($_GET["to"]) && is_numeric($_GET["to"])) {
$to = $_GET["to"];
<?
curl_setopt($curl, CURLOPT_PROXY, "<PROXY_URL>");
curl_setopt($curl, CURLOPT_PROXYPORT, "<PROXY_PORT>");
curl_setopt($curl, CURLOPT_PROXYTYPE, "<PROXY_TYPE>");