Skip to content

Instantly share code, notes, and snippets.

Avatar

Diego Rodríguez Baquero DiegoRBaquero

View GitHub Profile
View antiphish.sh
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
View express-debug-async-wrap.js
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 Nov 9, 2017
Calificación rápida de cursos en Banner
View gist:24e2e29e7be40905ad3f083bfb79ee69
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 Dec 24, 2016
Ubuntu 16.04 with latest NodeJS 6 & latest nginx
View init.sh
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 Nov 23, 2016
VPSCheap Benchmark Log
View bench.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 Oct 14, 2016
Swap ws with uws
View uws.js
require('ws') // before
require('uws') // after
@DiegoRBaquero
DiegoRBaquero / demo2.html
Created May 8, 2016
File Download with WebTorrent
View demo2.html
<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)
@DiegoRBaquero
DiegoRBaquero / demo.html
Created May 8, 2016
Stream Alpine Timedrift WebTorrent with Webseed
View demo.html
<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/timedrift-alpine-4k-timelapse.mp4.torrent', function (torrent) {
// Got torrent metadata!
console.log('Client is downloading:', torrent.infoHash)
@DiegoRBaquero
DiegoRBaquero / createInstall.sh
Created May 8, 2016
Install create-torrent NPM module
View createInstall.sh
npm i -g create-torrent
@DiegoRBaquero
DiegoRBaquero / tracker.btorrent.xyz.nginx-conf
Last active Sep 4, 2018
btorrent's tracker nginx conf
View tracker.btorrent.xyz.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;