Skip to content

Instantly share code, notes, and snippets.

View vndmtrx's full-sized avatar
💅
Fazendo vários nadas

Eduardo N.S.R. vndmtrx

💅
Fazendo vários nadas
View GitHub Profile
@adtac
adtac / Dockerfile
Last active April 13, 2024 22:33
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@jeanjmichel
jeanjmichel / MontyHallProblem.js
Last active October 29, 2020 17:49
A JavaScript code to test the Monty Hall Problem.
var myBet = Math.floor(Math.random() * 3) + 1;
var acceptChangeInitialBet = Math.floor(Math.random() * 2) + 1;
function game(initialBet, changeInitialBet) {
var portsAndPrizes = [];
var carPort = Math.floor(Math.random() * 3) + 1;
var newBet;
var discardedDoor;
var finalGoatDoor;
var finalBet;
@JohannesBuchner
JohannesBuchner / rsyncprogress.py
Last active June 18, 2023 18:51
Progress bar for rsync
"""
Progress bar for rsync
========================
Shows file progress and total progress as a progress bar.
Usage
---------
Run rsync with -P and pipe into this program. Example::
@hsribei
hsribei / putting-the-tor-back-in-torrent.md
Last active January 18, 2017 22:08
Putting the "Tor" back in Torrent

Putting the "Tor" back in Torrent

How a Popcorn Time fork patch could incentivize people to run thousands of new Tor relays

This is a follow-up to this discussion: Can NAT traversal be Tor's killer feature?

If torrents are P2P's killer application, and NAT traversal/"static IP" are Tor's (via hidden services), putting them together could prove to be the best incentivization scheme for growing the Tor network other than cold crypto cash.

You're stupid

Everybody knows you're not supposed to use torrents with tor, right?