Add Reddit Share button to Hexo's Landscape theme

I have added a Reddit button to Hexo’s Landscape theme by re-using existing code for Pinterest’s share button (found by searching Landscape’s Github repo for references to Pinterest), with minor modifications specific to Reddit.

Additionally, I had to update font-awesome to its latest git version as version 4.2 does not provide a reddit icon.

The changes I made can be found in this Git commit

Automatically tweet new Hexo entry via IFTTT

In the absence of Wordpress’ Publicize, I have decided to use IFTTT in conjunction with Hexo Feed Generator, to automatically publicize my Hexo entries.

IFTTT, which stands for If This Then That , is a tool that automates tasks using triggers and actions. IFTTT connects two services, and then triggers an action on one service when you perform an action on the other service. It works with all of the major social networks, including Facebook, Twitter, Instagram, LinkedIn, Tumblr, and YouTube.

After connecting my twitter account, I chose to use a new rss feed entry as the ‘trigger’, and a new tweet as the ‘action’. My recipe can be found here.

Instructions for applications can be found by traversing the links provided.

Plex Home Theatre on Debian Wheezy

Plex Home Theatre on Wheezy requires packages from 2 additional repos, and a specific Ubuntu font package. The following instructions illustrate this:

  • Add repos:

sudo apt-get install curl

sudo curl | sudo apt-key add -

echo "deb wheezy main non-free" | sudo tee -a /etc/apt/sources.list.d/deb-multimedia.list

echo "deb wheezy main" | sudo tee -a /etc/apt/sources.list.d/plex.list

sudo apt-get update

sudo apt-get install deb-multimedia-keyring
(press Y to confirm)

sudo apt-get update

sudo apt-get dist-upgrade

cd /tmp && { curl -O ; cd -; }

sudo dpkg -i /tmp/ttf-ubuntu-font-family_0.80-0ubuntu2_all.deb

  • Install Plex Home Theatre

sudo apt-get install plexhometheater

Quick Git Hints (Work-In-Progress)

A compilation of Git commands I have found useful so far:

  • Merge multiple pushed commits, and push to remote

    For example, for 4 most recent commits:

    git rebase --interactive HEAD~4

    In interactive dialog, squash (merge) commits 2-4 - by replacing “pick” with “squash”

    Save session (e.g :wq in vi), and choose new commit message. Then:

    git push origin +master

  • Highlight word changes

    This only highlights the changed words, nicely inline. Try:

    git diff --word-diff

  • To quickly discard unstaged changes:

    git stash save --keep-index
    git stash drop

  • My ~/.gitconfig file - explanations can be found in individual commits to my github repo.

Configure Filebot for in Windows

FileBot in Windows is a bit tricky to use when it comes to batch subtitle downloads.

In particular, prevents leeching by requiring login details to be passed to Filebot. This isn’t so straightforward in Windows with no gui configuration available.

We are required to use the console version of FileBot from the windows commandline

Firstly, get into the commandline:

<win-R> cmd

Then do:

cd C:\Program Files\FileBot

Your prompt should now show:

C:\Program Files\FileBot>

Then do:

filebot.exe -script fn:configure

Enter OpenSubtitles username: ******
Enter OpenSubtitles password: ******

Testing OpenSubtitles... OK

Finally, with all movies in a network-mounted Y:\, for example, do:

filebot.exe -script fn:suball "Y:" --lang en -non-strict

My elaborate movie-format rename scheme follows:

  • yielding something like: