2011-09-24

Upgrading the sheevaplug

Upgrading the sheevaplug
Had to upgrade my parents plug.
The whole thing, uboot, distro, etc.
Thanks to this awesome guide everything went very smoothly.

2011-09-23

flexget + transmission + tvtorrents + CentOS 5

flexget + transmission + tvtorrents + CentOS 5
Part I: Get transmission installed

Add repository

in /etc/yum.repos.d/geekery,repo add:
[geekery]
name = geekery repository
baseurl = http://geekery.altervista.org/geekery/el5/$basearch
enabled = 1
protect = 0
gpgkey = http://geekery.altervista.org/download.php?filename=GEEKERY-GPG-KEY
gpgcheck = 1

install packages

sudo yum install transmission transmission-daemon transmission-cli transmission-common

Config

  • in /etc/sysconfig/transmission-daemon add the following line: (Change IP, passwords and path to what fit:s your need)
DAEMON_ARGS="-b -t -a \"192.168.*.*\" -e /var/log/transmission/transmission.log -u user -v password -w /incoming"
  • setup correct permissions for the download directory (/incoming)
$ sudo mkdir /incoming
$ sudo chown transmission:users /incoming
$ sudo chmod 770 /incoming
  • start the daemon
$ sudo service transmission-daemon start

Access through browser

Remote GUI

  • Get the binary here.
  • extract and run.

Alternatively Java GUI


Part II: Configure flexget
See the previous post to see how to get it installed on CentOS.

Requirements

I had to manually update the version of transmissionrpc:
sudo easy_install-2.6 transmissionrpc

Configuration

As the feeds on tvtorrent are already limited to the series you select, it is OK, to just get everything in the feed. Flexget will take care of not downloading duplicates (different quality). By default it will prefer the better quality.
Add the following to ~/.flexget/config.yml
feeds:
  feed_name:
    rss: <Your rss feed here>
    download: ~/torrents
    all_series: yes
    transmission:
      host: 192.168.0.5
      port: 9091
      username: bon
      password: <password>

Testing

You can check your settings for syntax by running:
flexget -v --check
For a dry-run, run:
flexget -v --test
If everything works OK, just put it in a cron-job to run every now and then.

2011-09-22

Install flexget on Centos 5.x

Install flexget on Centos 5.x
I want to play with flexget a bit on CentOS 5.x. Since it requires python 2.6 (well 2.5 is also OK), It's a bit tricky. Mostly resolving dependencies.
So in case anybody want's to do the same, maybe this saves a few clicks.

As I am also lazy, I just paste this from my bash history:

sudo yum install python26 python26-devel
cd ~/downloads/
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
cd ~/tmp/
tar xvf ~/downloads/setuptools-0.6c11.tar.gz
cd setuptools-0.6c11/
sudo python26 setup.py install
cd ~/downloads/
sudo easy_install-2.6 http://download.cherrypy.org/cherrypy/3.2.0/CherryPy-3.2.0-py2.6.egg
wget http://pypi.python.org/packages/source/F/Flask/Flask-0.7.2.tar.gz
cd ~/tmp/
tar xvf ~/downloads/Flask-0.7.2.tar.gz
cd Flask-0.7.2/
sudo python26 setup.py install
cd ~/downloads/
wget http://pypi.python.org/packages/source/p/progressbar/progressbar-2.2.tar.gz
cd ~/tmp/
tar xvf ~/downloads/progressbar-2.2.tar.gz
cd progressbar-2.2/
sudo python26 setup.py install
cd ~/downloads/
wget http://pypi.python.org/packages/source/p/pynzb/pynzb-0.1.0.tar.gz
cd ~/tmp/
tar xvf ~/downloads/pynzb-0.1.0.tar.gz
cd pynzb-0.1.0/
sudo python26 setup.py install
cd ~/downloads/
wget http://www.dalkescientific.com/Python/PyRSS2Gen-1.0.0.tar.gz
cd ~/tmp/
tar xvf ~/downloads/PyRSS2Gen-1.0.0.tar.gz
cd PyRSS2Gen-1.0.0/
sudo python26 setup.py install
cd ~/downloads/
wget https://html5lib.googlecode.com/files/html5lib-0.90.zip
cd ~/tmp/
unzip ~/downloads/html5lib-0.90.zip
cd html5lib-0.90/
sudo python26 setup.py install
cd ~/downloads/
wget http://www.crummy.com/software/BeautifulSoup/download/3.x/BeautifulSoup-3.2.0.tar.gz
cd ~/tmp/
tar xvf ~/downloads/BeautifulSoup-3.2.0.tar.gz
cd BeautifulSoup-3.2.0/
sudo python26 setup.py install
cd ~/downloads/
wget http://pyyaml.org/download/pyyaml/PyYAML-3.10.tar.gz
cd ~/tmp/
tar xvf ~/downloads/PyYAML-3.10.tar.gz
cd PyYAML-3.10/
sudo python26 setup.py install
cd ~/downloads/
wget http://prdownloads.sourceforge.net/sqlalchemy/SQLAlchemy-0.7.2.tar.gz?download
cd ~/tmp/
tar xvf ~/downloads/SQLAlchemy-0.7.2.tar.gz
cd SQLAlchemy-0.7.2/
sudo python26 setup.py install
cd ~/downloads/
wget https://feedparser.googlecode.com/files/feedparser-5.0.1.tar.bz2
cd ~/tmp/
tar xvf ~/downloads/feedparser-5.0.1.tar.bz2
cd feedparser-5.0.1/
sudo python26 setup.py install


2011-09-21

special ssh config file with git remote

special ssh config file with git remote


For complicated reasons (nfs mounts, permissions, etc) I need a special ssh config file to use with git remote. This is actually done quite easily by using a wrapper script:
#!/bin/bash
/usr/bin/ssh -F /path/to/ssh/config $@

Then just export the variable GIT_SSH to point to the wrapper script.
export GIT_SSH='/path/to/ssh_wrap'

2011-09-14

Setting shell in crontab

I didn't know until now, that you can set a shell in crontab, ignoring whatever shell is set for the crontab's user.
SHELL=/bin/bash
This can be useful, if you have to rely on a certain shell or environment for whatever reason.

2011-09-11

Japanese pdfs & fonts

I don't know why it's not installed by default, but to get Japanese PDFs in Ubuntu  11.04 displayed correctly you need to install the package 'poppler-data' .Quite easy, once you know what the problem is