Skip to content

Instantly share code, notes, and snippets.

View DiegoRBaquero's full-sized avatar

Diego Rodríguez Baquero DiegoRBaquero

View GitHub Profile
@DiegoRBaquero
DiegoRBaquero / log.txt
Created May 18, 2023 00:08
Size comparison logs
QmcLto5gcLbRJrEu9SvFGfknSshpHxx4aaN9mQbYghYLhM
QmYxTdUeU8txxdHUVuSTnTjqDFSPdgX5Vd4bcrvK5NByBT
{
'ipfs.io': { status: 200, cache: 'HIT', size: 758774 },
'bifrost-gateway.ipfs.io': { status: 200, cache: 'MISS', size: 758774 },
'strn.pl': { status: 200, cache: 'HIT', size: 524635 }
}
QmeGMJhecHs4ofeFLiJJcmcE3L3oFU3tAniPg9Wn3rXQAA
QmQpgjjcjXvVxbTm4FUPRa8uCsdE8S13uRiEEK3Vd5xadr
QmSMfezQBV3Wy8jNJFMZzuo13uJdL4S8VxW1nfV7ZBHoyq
@DiegoRBaquero
DiegoRBaquero / gist:fb58d014e34839d64b8850e8f2a8f88e
Created August 25, 2022 14:37
OpenSSL Generate Key, CSR and Self-Signed Cert (256 bit ECDSA)
openssl ecparam -name prime256v1 -genkey -noout -out local.key
openssl req -new -sha256 -key local.key -out local.csr
openssl x509 -req -days 365 -sha256 -in local.csr -signkey local.key -out local.crt
@DiegoRBaquero
DiegoRBaquero / tracker.btorrent.xyz.nginx-conf
Last active September 4, 2018 15:38
btorrent's tracker nginx conf
server {
listen 443 ssl spdy;
listen [::]:443 ssl spdy;
server_name tracker.btorrent.xyz;
ssl_certificate /etc/nginx/ssl/tracker.btorrent.xyz.crt;
ssl_certificate_key /etc/nginx/ssl/tracker.btorrent.xyz.key;
location / {
proxy_pass http://127.0.0.1:8000;
while true; do curl 'https://universidaddelosandescolombiasitiooficit.weebly.com/ajax/apps/formSubmitAjax.php' -H 'Cookie: is_mobile=0; language=en; _sp_ses.bbff=*; _sp_id.bbff=c58acf4a-4efd-461e-8688-35347b6f14c1.1518985095.1.1518985095.1518985095.df4993fe-1961-4bb3-bfcd-dd126dc03aa0; _snow_ses.3e19=*; _snow_id.3e19=bc090992-8ec3-4d38-90be-ba5b828310d8.1518985096.1.1518985096.1518985096.bc217089-a574-4464-9168-464ddd36d956' -H 'Origin: https://universidaddelosandescolombiasitiooficit.weebly.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9,es-419;q=0.8,es;q=0.7,gl;q=0.6' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36' -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundarytBrHV2SBWeP6VtIJ' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'Cache-Control: max-age=0' -H 'Referer: https://uni
@DiegoRBaquero
DiegoRBaquero / express-debug-async-wrap.js
Created January 20, 2018 18:58
express-debug-async-wrap
module.exports = debug =>
fn =>
(req, res, next) =>
fn(req, res, next)
.catch(e => {
e.status = e.status || 400
e.debug = debug
next(e)
})
@DiegoRBaquero
DiegoRBaquero / gist:24e2e29e7be40905ad3f083bfb79ee69
Last active November 9, 2017 00:18
Calificación rápida de cursos en Banner
let calificacion = 4 // Cambiar por el valor deseado {1,2,3,4}
for(let i = 1; i <=33; i++) { if(i === 17) continue; $(`input[value="${i}-${calificacion}"]`).click() }
@DiegoRBaquero
DiegoRBaquero / init.sh
Created December 24, 2016 18:23
Ubuntu 16.04 with latest NodeJS 6 & latest nginx
apt-get update && apt-get upgrade
# Latest LTS NodeJS Repo
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
# Latest nginx repo
echo "deb http://nginx.org/packages/ubuntu/ xenial nginx" >> /etc/apt/sources.list.d/nginx.list
echo "deb-src http://nginx.org/packages/ubuntu/ xenial nginx" >> /etc/apt/sources.list.d/nginx.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62
@DiegoRBaquero
DiegoRBaquero / bench.log
Created November 23, 2016 04:44
VPSCheap Benchmark Log
System Info
-----------
Processor : Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz
CPU Cores : 4
Frequency : 3600.013 MHz
Memory : 4096 MB
Swap : MB
Uptime : 1 day, 12:12,
OS : Ubuntu 16.04.1 LTS
@DiegoRBaquero
DiegoRBaquero / uws.js
Last active October 14, 2016 07:12
Swap ws with uws
require('ws') // before
require('uws') // after
@DiegoRBaquero
DiegoRBaquero / demo2.html
Created May 8, 2016 19:04
File Download with WebTorrent
<html>
<body>
<script src="https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js"></script>
<script>
var client = new WebTorrent()
client.add('https://webseed.btorrent.xyz/juanpabloaj/other-page.torrent', function (torrent) {
// Got torrent metadata!
console.log('Client is downloading:', torrent.infoHash)
torrent.files[0].getBlobURL(function(err, url) {
if (err) return console.log(err)