Install and use TwitteR to DM when task is done

Thursday, March 22nd, 2018
Commands, R, Software, Ubuntu

After trying several annoying “recipes” I landed on this approach on Ubuntu (Linux). Will try Windows later on to see if it differs. I use R-studio.

Update: Worked fine on Windows (just skip the first section)


Installing on Ubuntu

Got a bunch of errors trying to install “devtools” in R. First install packages (terminal): sudo apt-get install libssl-dev

still got errors and went on to install this: sudo apt-get install libssl-dev

TwitteR install on Ubuntu and Windows

Went on to install the following R-packages:

install.packages(c("devtools", "rjson", "bit64", "httr"))

Loading library and installing twitteR via GitHub:


Creating twitter app

Create a Twitter application at Make sure to give the app read, write and direct message authority. You can change this under the Permissions tab. The information about API stuff is found under Keys and Access Tokens

Go nuts with twitteR


# copy paste from web
APIkey           = "insert_here"
APIsecret        = "insert_here"

# set up and follow the steps
setup_twitter_oauth(APIkey, APIsecret)

Once completed you’re ready to go!

The function taskStatus sends a Twitter DM after completion of a task to twitter_user:

taskStatus(print("Watch your fucking phone!"), "twitter_user", msg = " It's fucking working!")

Lexmark s605 Interact on Ubuntu 13.10

Thursday, January 16th, 2014
Commands, Software, Ubuntu
, ,

Lexmark S605 Interact printer

Lexmark S605 Interact printer

I struggled for some time to get my Lexmark printer to work both on and off my wireless home network, and it was hard to find help online. One day of frustrating trials and errors boiled down to this:

  1. I installed the recommended drivers from Lexmark Support
  2. I opened the Lexmark Printer Utility from the Ubuntu menue
  3. I followed the instructions to install a new wireless printer.
    Trying to print at this stage gave an error message: Directory “/usr/local/lexmark/v3/bin” has insecure permissions.
  4. Following the advice in this thread.
    I changed the permissions:
    sudo chmod 755 /usr/local/lexmark/v3/bin/printfilter

And it worked :-)

LaTeX to MS Word, Open Office or Libre Office Writer

Friday, May 24th, 2013
Commands, Software
, ,

So Writer2Latex works great, but what is the solution when you want to switch FROM editing text documents in LaTeX TO editing it softwares like MS Word? This sounds like a bad idea, but is often needed in order to collaborate on papers with non-LaTeX users (e.g. to use track changes and all that stuff).
I found this:

How to use latex2rtf inside Ubuntu is described here:

Adjusting large figures using LaTeX

Friday, May 3rd, 2013
Commands, Software
, , , , , , ,

Typesetting my thesis I came across this problem:
I had a large figure (containing many panes) I wanted to print on one page with a caption underneath.

Read more


So, it’s finally time to start typesetting my PhD thesis. I decided to go with LaTeX. Main reason: avoid format fuck-ups. The University of Oslo has their own PhD document class. The guidelines can be found here:

Now, my supervisors are not really familiar with LaTeX, which makes it hard to collaborate on these documents. However, writing documents in LibreOffice Writer and then converting them to tex-files which can be linked together and compiled into one “thesis document” proved quite easy. I just installed Writer2LaTeX. Here is how I got it to work with LibreOffice (in Ubuntu):

  1. Download Writer2LaTeX extension from this place
  2. Install the downloaded extension in LibreOffice (Tools -> Extension Manager -> Add)
  3. I got an error message and it looked like it had something to do with Java, so I ran this line (in terminal) to install some missing packages
    sudo apt-get install
  4. Finally I enabled the Writer2LaTeX extension and now I’m all set.
    (BTW – If the extension doesn’t appear in the manager at this step, try installing it once again)


If you’re an Ubuntu user like me – check out Gummi. Real neat for editing LaTeX.

Disk image from .nrg to .iso

Friday, January 4th, 2013
Commands, Leisure, Software
, , ,

So, I had this disk image of a game I used to play before I converted to Linux. The image was burned using Nero. To be able to install the game under wine in Ubuntu I converted it to an iso-image following these steps:

  1. Install nrg2iso:
    sudo apt-get nrg2iso
  2. Convert file:
    nrg2iso filename.nrg filename.iso

That’s it folks :-)

Older Posts Back

Post Archive

by Date: