Entries filed under English

Update to the latest scala version with Ubuntu 12.04 Precise Pangolin

Posted on 7. Oktober 2013 Comments

Basically the wiki at summercode.com says it all, go to (or wget) the latest version at http://www.scala-lang.org/download and untar it. Then move the folder to /usr/share/scala. Then link the address of the new binaries to the old binaries in /usr/bin. The main problem here is that you have to delete them first so I just want to add this little piece of shellscript(including the instructions from the tutorial mentioned above):

$ wget http://www.scala-lang.org/files/archive/scala-2.10.3.tgz
$ tar zxf scala-2.10.3.tgz
$ sudo mv scala-2.10.3 /usr/share/scalasudo rm /usr/bin/scala
$ sudo rm /usr/bin/scalac
$ sudo rm /usr/bin/fsc
$ sudo rm /usr/bin/sbaz
$ sudo rm /usr/bin/sbaz-setup
$ sudo rm /usr/bin/scaladoc
$ sudo rm /usr/bin/scalap
$ sudo ln -s /usr/share/scala/bin/scala /usr/bin/scala
$ sudo ln -s /usr/share/scala/bin/scalac /usr/bin/scalac
$ sudo ln -s /usr/share/scala/bin/fsc /usr/bin/fsc
$ sudo ln -s /usr/share/scala/bin/sbaz /usr/bin/sbaz
$ sudo ln -s /usr/share/scala/bin/sbaz-setup /usr/bin/sbaz-setup
$ sudo ln -s /usr/share/scala/bin/scaladoc /usr/bin/scaladoc
$ sudo ln -s /usr/share/scala/bin/scalap /usr/bin/scalap

Or download the file here: update-scala.sh (github clone)

SQLDeveloper with Ubuntu 12.04, alien and the .rpm-file

Posted on 30. September 2013 Comments

There are a couple of tutorials[1] of how to install Oracles SQLDeveloper and they all say to install the sqldeveloper-XXX-no-jre.zip, in this case sqldeveloper-3.2.20.09.87-no-jre.zip. I didn’t read it because my first idea was the following and it also worked: It’s possible to download the .rpm-file and convert it with alien. You might have to install it with

sudo apt-get install alien

then

alien sqldeveloper-3.2.20.09.87-1.noarch.rpm
dpkg -i sqldeveloper_3.2.20.09.87-2_all.deb

You can then start the sqldeveloper. It will ask you for the Java Path which is usually /usr/lib/jvm/java-6-openjdk and give you some kind of error, which didn’t seem to have any impact.

repat@laptop:~$ sqldeveloper
Oracle SQL Developer
Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk
/usr/lib/jvm/java-6-openjdk
/opt/sqldeveloper/sqldeveloper/bin/../../ide/bin/launcher.sh: Zeile 455: /home/repat/.sqldeveloper/jdk: Datei oder Verzeichnis nicht gefunden

[1] e.g. Oracle Forum, Linux Sagas, Software in a bottle

Simple MRBS Output from Database

Posted on 17. September 2013 Comments

I wrote a little PHP-script that extracts the most important and current data from MRBS’s MySQL database and just prints them in a simple HTML file. Its not pretty but good for bandwith and clarity. We use it to display information on an energy efficient e-ink screen in front of conference/computer rooms.

$date is set like this:

$date = date("Y-m-d");

The SELECT-statements go like this, where N is the ID of the room(in the database, not what you might call it)

SELECT name,description,from_unixtime(start_time),from_unixtime(end_time) FROM mrbs_entry WHERE from_unixtime(start_time) LIKE '%" . $date . "%' AND room_id = N;

I’m not gonna explain here how to establish a database connection in PHP, but you can have a  look at the whole sourcecode at github 😉

I then cut off the date with substr() because it’s always 10 characters in front of time->(YYYY-MM-DD) and printed it via echo. This is the simple version, there is a version with tables on github.

while($row=mysql_fetch_row($qry01)) {
echo "- <strong>Room</strong> 01 | <strong>Desc:</strong>" . $row[0]." - ".$row[1]." |  <strong>Time:</strong> ". substr($row[2],10) . " - " . substr($row[3],10) . " <br />";
}

update: I wrote another version that prints JSON objects which can be parsed on the other side. For easier parsing(e.g. if everything is in one String) I numbered them:

$jsonarray = array('begin' . $i => substr($row[2],11, 5), 'end' . $i => substr($row[3],11,5), 'name' . $i => $row['name'], 'description' . $i =>  $row['description']);

You’ll find the whole thing on github.

How I pay podcast producers and other online artists and don’t spend any extra money on it

Posted on 5. Januar 2013 Comments

//update: This doesn’t work anymore. Quote from the website: „aFlattr is currently unavailable. Due to the termination of the operating agreement from Amazon aFlattr is not operating right now and the future is not yet clear.“

 

1. I listen to a lot of podcasts and would like to thank them by throwing them a coin in their hat but don’t really have money left to spend.

2. I also buy something at Amazon nearly every month, be it for university or private, for work or friends(-> I get the money back)

Most of the (German) podcasts have a rel:payment-tag in their feeds and use it for the Swedish micopayment system flattr. This enables me to just press a button in my podcatcher.

The website and Firefox plugin aFlattr generates affiliate links for the stuff I buy on amazon and sends the money to my flattr account. That way I give away some money by buying stuff 🙂

Apple USB Ethernet Adapter for Android Tablets

Posted on 29. Dezember 2012 Comments

I just tried this for fun and didn’t expect it to work… I used a $3 USB adapter I usually use for USB sticks and just plugged in the Apple USB Ethernet adapter for the Macbook Air. Then I turned off WiFi. There was no notification or anything, it just worked out of the box 🙂 The tablet is a 32GB Nexus7 with Android 4.2.

image

prosody 0.8.2. still waiting

Posted on 10. Juli 2012 Comments

I tried to start prosody with user-privileges (with user/group prosody) but I kept getting this message from prosodyctl start:

Still waiting...
Proody is still not running. Please give it some time or check your log files for errors.

But there were no errors in the log-file. If I deleted the log-file nothing was created again. I tried giving all the prosody folders 777 rights and chown‚d them to the prosody-user, still…same error. I then went to the Prosody MUC. Once again, Zash helped me to isolate the error: the pid-file could not be written by the user. So I just changed the line

pidfile="/var/run/prosody.pid"

to:

pidfile="/home/prosody/prosody.pid"

Carnivorous Plants – Natures‘ Flyswatter

Posted on 4. Juli 2011 Comments

At summertime my kitchen is full of flies and little mosquitos, even though I live in a rainy part of Germany, which is not even that warm. Last time I went to the hardware store, I found the Venus Flytrap and thought I might give it a try. And it worked! The plant grew quite a bit. I gave it some time to see if it survives because usually not even a cactus will grow in my room :/ Probably because I see it everyday while eating I remembered to water it regularly. Best thing is: you can’t water it too much, it’s a Helophyte („swamp plant“), so it’s used to a lot of water;) One thing to be careful about: you can only use distilled water(1€/5 liter) or rain water. If you’ve got a pond in your garden that should be alright too. After a while I bought a little plastic terrarium and added a Sarracenia Purpurea and a Pinguicula caudata. It’s 5€ each and about 7€ for the little terrarium.

This is the perfect self-sustaining flyswatter brought to you by Nature™.
carnivorous plants
(click to enlarge)

carnivorous plants

Establish secure instant messaging connections via jabber and OTR

Posted on 12. April 2011 Comments

//update: even easier: My installer for both messenger and encryption

Instant Messaging is what most of you might know as ICQ, AIM, YIM, Windows Live Messenger(or „MSN“), Skype, Google Talk, etc.

What I’m going to show you is how to install the instant-messenger Pidgin, the encryption extension OTR and create a jabber-account with a provider of your choice. But don’t worry, this is not getting very technical, in fact, it probably takes you less than 5 minutes(!). At the end of the article you’ll find some more explanations and backgrounds, if you’re interested.

Step by step

1. Download Pidgin at http://www.pidgin.im/download (Link for Windows)

2. Download the OTR Pidgin plugin at http://www.cypherpunks.ca/otr/ (Link for Windows)

3. Install Pidgin, just doubleclick on the icon and press next every time you’re asked something. Then install the OTR plugin, same procedure.

4. Create a jabber account, for the beginning https://register.jabber.org/ will do. Just choose a nickname, that might be your real name, a nickname or some letter-number-chaos, just remember it and the password too.

5. Open Pidgin, you’re gonna be asked to create an profile/account. Choose XMPP as protocol. Username is the part in front of @jabber.org at your new jabber-address, so the nickname you chose before. Domain is jabber.org. Leave recource free and enter your password. Click Save.

7. Your buddy-list opens, as you might know it from ICQ or Skype. You can now add buddys via the main menu.

8. Enable OTR by clicking Tools/Plugins in the main menu, then scroll down, until you find Off-the-Records Messaging, make sure it’s checked.

9. As soon as you chat with someome who also has OTR installed, Pidgin creates a pair of keys(only for the first time). As from now on the connection is encrypted. Just make sure, the person you’re talking to, is really the person you think it is.

10. That’s what the verifying function is about. On the right side of a chat window, there is a button with encrypted but not authorized button, click on it and authorize your chat buddy via passphrase, question and answer or by compairing digital fingerprints over a secure connection, e.g. mobile phone or by standing next to each other.

 

Extra Information

Pidgin is a multi platform chat client. This means you can use whatever chat provider you want to, such as ICQ, Windows Live(MSN) or Skype and use just one programm for all of them. Also, OTR works with all of them, but to be completly independent on commercial providers, I chose jabber.

Jabber works a bit like e-mail (decentralized, that is). You have to choose a provider, just like you would choose hotmail.com, googlemail.com, yahoo.com etc for e-mail. There a quite a few providers, for example the Chaos Computer Club in Germany or even German Universities. Since most jabber software is free software you might even want set up your very own jabber server in your basement like me.

OTR has a pretty good encryption. The big advantage is the encryption from end to end, so unless the attacker is in control over your computer, no one can see what you’re writing. Plus, it’s plausible deniable, see Plausible Deniability at wikipedia

Jabber, or rather the protocol XMPP is used by various big companies such as Google(google talk) or Facebook(facebook chat). You just hardly ever get to know what’s behind a system.

IPv6 Privacy extensions Ubuntu 10.04

Posted on 15. Januar 2011 Comments

If not already happened, add the following to /etc/udev/rules.d/70-persistent-net.rules:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*",
RUN+="sysctl net.ipv6.conf.%k.use_tempaddr=2"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*",
RUN+="sysctl net.ipv6.conf.%k.use_tempaddr=2"

Usually this happens when installing miredo or similar IPv6 tunneling software, but you might want to double-check it. Also, check if the eth* and wlan* fit your ethernet/wifi devices.

btw, unfortunately Android and I-Phone Devices don’t have this, which causes quite a bit privacy concerns, see heise.de on IPv6 on Smartphones for more information (German)