Friday, February 12, 2016

What to do with a Raspberry Pi 2?

I previously turned my raspberry pi B into a Bittorrent Sync server but I wasn't sure what to do with my Pi 2. It has been sitting idle but I heard to you could run a minecraft server on one.

I thought I'd give it a shot on my own first. I know that the official minecraft server recommends 1gb of ram but that's all the raspberry pi 2 has so I figured I should reduce that a bit. First I should free up as much ram as possible. I set the pi to boot straight to a console and I set the memory split at the minimum 16mb. Running "free -m" tells me that there is about 934mb of ram free. I figured I'd leave a bit more for good measure and I'd set the minecraft to use a max of 904mb. Why 904? Well it's evenly divisible by 8. Does that matter? I don't know but that's the way I did it.

Go to minecraft.net and download the jar file. Put that in a folder and make a script to run

"java -Xmx904M -Xms512M -jar minecraft_server.jar nogui"

Replace 'minecraft_server.jar' with the name of the file you downloaded and you should be able to fire up the server. It'll fail and tell you to accept the eula. Open eula.txt and change false to true.

Everything is great, right? No. I kept getting weird glitches in the game and "server can't keep up" errors in the console. More research was needed.

I found a great guide that suggested using the spigot minecraft server. I kind of half followed the guide but basically grab the GUI installer from spigot, run it on a windows machine, and copy the spigot.jar file it creates and put that on your pi. Modify your script to use the spigot.jar instead of the official server jar file and you're good to go. I would do this in a new empty folder since it's going to create a whole bunch of files when you first run it.

On spigot my server seems to be running ok. I edited my server.properties file to limit the users to 3 and shortened the draw distance to 4 from 10. Hopefully that'll save some RAM.

It's kind of a neat use for a pi that was just collecting dust. I'll have to see if I can find someone to try out my server with me. I'm wondering if I leave it exposed to the internet if someone will just find it and come grief it. Everyone I know that's playing minecraft lately is playing it on the console.

Sunday, February 07, 2016

A Space Pen on the Cheap

I haven't been posting as much as I would like so I'm going to try to put more effort into posting more often. I don't always take pictures of stuff I'm doing or even do anything terribly exciting but I'm still doing things that I think are fun.

When I got married I gave my groomsmen space pens as the groomsmen gift and I got one for myself. I hadn't really found a way to move it into my regular pen use so it floated around my house in a sad existence. A while ago I realized that the clip is steel and will stick to a magnet. Since then it's been stuck to the front of my fridge doing grocery list duty. At least it's being used but still not an existence worth of the pen that went to the moon.

A couple weeks ago I discovered that the price of the anti-gravity space pen was up to $90CDN so I felt that the front the fridge was no place for mine. I moved it to my EDC pen and needed a replacement for the fridge. I liked having it there since it would write reliably on all kinds of paper and at any angle. I had heard that you could mod a zebra pen to hold a space pen refill.

Here is a great guide. http://clickypost.com/blog/2015/2/1/how-to-hack-the-zebra-f-701

I was out and about and found myself at a Staples so I grabbed what I needed. A Zebra F-701 and a space pen refill. I was shocked that they had both in stock and then equally shocked that the refill was worth more than the pen. The guide above also adds the step of getting another pen to replace a plastic part in the F701 but I didn't worry about that.

The basic mod is to unscrew the tip of the pen, remove the refill but keep the spring. There is a little clear plastic collar in the pen tip that has to go so take the space pen refill and poke it through the tip backwards. That should pop the clear plastic part out. Now put the spring on the space pen refill and put the refill in the pen as normal. Screw the tip back on and you're done. That's it. When I originally heard mod I was thinking there would be cutting, filing, welding, grinding, etc involved. Nope.

Now the fridge has a nice stainless steel space pen and I've got my pen in a more dignified roll. The total cost of the new pen? About $18 or about 20% of the cost of a space pen.