Install and use TwitteR to DM when task is done

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

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:

require(devtools)
install_github("geoffjentry/twitteR")

Creating twitter app

Create a Twitter application at http://dev.twitter.com. 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

require(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
, ,
None

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 :-)



Appendix for PLoS – get LaTeX supplementary figure annotations right!

Wednesday, October 23rd, 2013
Commands, PhD
, , , ,
None

My last post was about how to compare two latex-files and create a PDF with changes tracked using latexdiff. I needed to do this in order to resubmit a paper to PLoS ONE that had been accepted with some revisions. In short – the editor wanted to see if I had done the job.

In this post I’ll show how I adjusted the figure annotations on supplementary figures using LaTeX.
Read more



Track changes in LaTeX documents

Friday, September 20th, 2013
Commands, Science
, ,
None

Editing

Credits: Hollee J. Chadwick and Eve Corbel

I wrote a scientific paper, submitted it to PLoS ONE and got it accepted with some changes. These days I usually edit text or scripts and use git version control to keep track of the changes. The journal, however, requires that changes are tracked in the revised document itself.

Read more



PhD thesis, uiophd documentclass and home computer. Done.

Thursday, June 6th, 2013
Commands, University of Oslo
, , , ,
None

Using the uiophd documentclass in a latex file on your home computer:

Read more



LaTeX to MS Word, Open Office or Libre Office Writer

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

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:
http://sourceforge.net/projects/latex2rtf/

How to use latex2rtf inside Ubuntu is described here:
http://manpages.ubuntu.com/manpages/hardy/man1/latex2rtf.1.html



Older Posts Back

Post Archive

by Date: