jueves, 13 de marzo de 2014

[How to] Python IDLE tab completion

1. Put the codes into a file named '.pythonstartup'.

import pdb

# python startup file
import readline
import rlcompleter
import atexit
import os

# tab completion
readline.parse_and_bind('tab: complete')

# history file
histfile = os.path.join(os.environ['HOME'], '.pythonhistory')

try:
    readline.read_history_file(histfile)
except IOError:
    pass

atexit.register(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter

2. Put the file into your HOME directory.
Linux/Mac : ~/.pythonstartup Windows : C:\Users\USERNAME\.pythonstartup
PS: In MacOsX probably you will need to install readline
sudo easy_install readline 
3. Set the Environment Variables.

In Windows : Just do it like this.

In Linux/Mac : Put the line into the file named '.profile'.
 export PYTHONSTARTUP=~/.pythonstartup 
Previews:


Source: 0nly.me

domingo, 9 de marzo de 2014

[How to] Android pc and remote torrent control


Hi, now days Android pc/sticks is very common, and probably many of the people search solution how to manage their torrent client(installed on android) from web/other device. I found one very interesting solution Ttorrent:



This app has 2 versions: Lite and Pro

Lite version has limited of download speed to 250 kb/s and ads (version for MIPS)
Pro version no has any limits :) (version for MIPS)

Features of pro version 1.3.0:

- UNLIMITED DOWNLOAD SPEED!
- chose single files for download from torrents containing multiple files
- multiple torrent downloading
- queuing
- search for torrents
- Wifi only mode, Wifi or WiMAX mode
- able to set Upload / Download speed in options
- web browser integration
- magnet link support
- trackerless torrent (DHT) support
- RSS support(automatically download torrents published in feeds)
- UPnP and NAT-PMP support
- IP filtering support
- proxy support (SOCKS, HTTP)
- encryption
- Local Peer Discovery
- creating torrents
- x86 compatibility
- Web interface

- custom label support

Web Interface:




At the moment is a bit poor of functionality, only permit add torrent file or magnet link, and remove/pause/restore. Choose of file to download (work only in transdroid).

Other solution to manage Ttorrent is: transdroid

Transdroid is a universal app to manage different torrent clients.
Some screenshots from official page:





Web interface enabling:

Settings -> Interface -> enable web interface

I recommend change default port number.

Transdroid configuration: 

1) Download and install transdroid
2) Settings -> Add new server
3) You can specify name to this client, but this is optional
4) Select in Server type -> qBittorrent
5) Put your Android device(where installed torrent client) IP address (you can see it in Android settings)
6)Advanced settings -> Port number, you need to put there web interface port number if you change, if not by default this is: 1080

Now you can use Transdroid to manage your torrent client

When author of Ttorrent will add web interface authentication I will publish manual how to configure web interface and Transdroid to can access them from any place, expose it to internet

We can suggest some feature to Ttorrent here

Transdroid screenshots source transdroid
Torrent screenshot source Ttorrent

How to configure access to your torrent server from anywhere:

You will need to create an account on no-ip.com and do some configuration, you can see how on the video 


Then install no-ip client app in your android device and login with your account.

Update 1 19/04/2014 Web autentificacion and HTTPS added
Update 2 26/04/2014 How to access to your torrent server from everything

Best regards