Skip to content

Instantly share code, notes, and snippets.

@KhArtNJava
KhArtNJava / PrivateTorrent.md
Created July 8, 2017 17:14 — forked from sourcec0de/PrivateTorrent.md
Host a private torrent tracker, and seed a torrent on ubuntu 12.10

Install dep, and start tracker

sudo apt-get install bittornado ctorrent
bttrack --port 6969 --dfile ~/.bttrack/dstate --logfile ~/.bttrack/tracker.log --nat_check 0 --scrape_allowed full

Now, create a torrent file

ctorrent -t -u "YOUR_SERVER_IP:6969/announce" -s new_file_name.torrent file_or_folder_for_torrent
@KhArtNJava
KhArtNJava / gist:8bdf0a80c15429d4412aee07ae788ec0
Created August 9, 2016 07:45
Slow github speed download from my server in Moscow
46.29.161.220
Can't run "The speed test results shown at http://jnewland.github.io/speedtest.html", because I dunno, how to run it
on console linux server.
root2@srvJH:/tmp$ git clone https://github.com/github/hub /tmp/hub-http
Cloning into '/tmp/hub-http'...
remote: Counting objects: 12534, done.
remote: Compressing objects: 100% (150/150), done.
remote: Total 12534 (delta 79), reused 0 (delta 0), pack-reused 12384
Receiving objects: 100% (12534/12534), 3.39 MiB | 979.00 KiB/s, done.
@KhArtNJava
KhArtNJava / gist:7a5e54bf05f2c1e0cfb36d56a4bc0a37
Created August 9, 2016 07:40
Slow github speed download from my local machine
78.138.134.202
Page https://canhazip.com/ is opened in 224 ms
https://jnewland.github.io/speedtest.html
1033109 bytes downloaded from github.com at 2.33 Mbps
1033109 bytes downloaded from githubusercontent.com at 1.16 Mbps
git.exe clone --progress -v "https://github.com/github/hub" "E:\tmp\hub"
Cloning into 'E:\tmp\hub'...
# Get your files that Gmail block. Warning message:
# "Anti-virus warning - 1 attachment contains a virus or blocked file. Downloading this attachment is disabled."
# Based on: http://spapas.github.io/2014/10/23/retrieve-gmail-blocked-attachments/
# Go to your emails, click the arrow button in the top right, "Show original", save to the same directory as this script.
import email
import sys
import os
if __name__ == '__main__':