Saturday, August 19, 2017

downloading torrents in GNU/linux (magnet URIs)

Torrents have changed so much...

Nowadays they're greatly distributed in magnet:XXX-looking URIs.
Check more about that in http://www.vuze.com/about-torrents/magnet-links.
I guess it's better than getting lots of torrent files.

Anyway, to be able to open and use these files, here's my favorite torrent client and how to use it.
It's utorrent!

http://www.utorrent.com/downloads/linux

1. Get the utorrent server (it's a server because you can actually access it from the internet too, or your LAN, but you can just use it on localhost as a normal client).
2. cd to wherever the file "utserver" is, and run "./utserver -settingspath &"
3. login to http://localhost:8080/ (user = admin, blank password by default)
4. click the chain looking icon to add a random torrent URL and you're done.

For non GUI related stuffs I liked aria2c, but it stopped working... lots of data are now being encrypted and everything, kinda going out of the original scope of a bittorrent client, which has some good and bad sides.

Anyway, have fun with utorrent.

Monday, August 7, 2017

common lisp getting drakma working from default install

Basic clisp setup to get drakma working


drakma is a lisp html client.

I'm using GNU CLISP 2.49.

If you just try to install it with the default asdf and quicklisp installed under it on debian 8 it won't work...

Anyway,
1. Install asdf's latest version https://common-lisp.net/project/asdf/ (I have 3.1.4) 
This means just downloading the source, and doing make mostly.
2. load your new asdf every time by adding it to your ~/clisprc.lisp
something like
(load "/yourhomedir/bin/lisp/clisp/asdf/build/asdf.lisp")
3. Install quicklisp https://www.quicklisp.org/beta/#installation
This is mostly downloading the install file, and doing 
(load "/yourhomedir/bin/lisp/clisp/install_ql/quicklisp.lisp")
(ql:add-to-init-file)

4. Then you're ready to install drakma
(ql:quickload :drakma) (drakma:http-request "https://www.debian.org/" :connection-timeout 'nil)
(in common lisp you need the :connection-timeout 'nil thing or it won't work... that's not very nice)

And you should be getting something the requested page on stdout:

...
...!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd
...


debian change display output interface from vga to dvi

Updating your X output interface


I have an nvidia video card, and I'm finally switching from VGA to DVI... I didn't even know I had that port till a few days ago.
I'm not adding a new display for dual/triple display, but just switching the cables for the same one and only display I have.

1. Plug in the DVI cable to your monitor and video card.
2. When you do the xrandr command, you should be seeing something like:
$ xrandr
Screen 0: minimum 8 x 8, current 1440 x 900, maximum 16384 x 16384
DVI-I-0 disconnected primary (normal left inverted right x axis y axis)
VGA-0 connected 1440x900+0+0 (normal left inverted right x axis y axis) 410mm x 260mm
   1440x900      59.89*+  74.98  
   1400x1050     74.87  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    70.07    66.00    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    65.99    59.94  
DVI-I-1 connected (normal left inverted right x axis y axis)
   1440x900      59.89 +  74.98  
   1400x1050     74.87  
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    70.07    66.00    60.00  
   800x600       75.00    72.19    60.32    56.25  
   640x480       75.00    72.81    65.99    59.94  
HDMI-0 disconnected (normal left inverted right x axis y axis)


3. Here you see the VGA-0 (your current display), and DVI-I-1 (your new one) are connected.
The only thing to do next is:

xrandr --output DVI-I-1 --auto


4. Your monitor should blink for a moment. Then you're probably ready to go! Disconnect your VGA cable, and if you still have something on your screen, it's working, yay.

5. Disconnect your old VGA cable, and give it a good burial.