Author Archive

Hey folks! You won’t be able to see this for a while, but it’s so awesome I can’t not write this RIGHT NOW! So BRBcoffee has moved around quite a bit, and even changed names every now and again, but this is by far the best relocation to date! Guess from whence your magical computing device is currently furiously fetching packages at almost the speed of light! Go on, guess, I’ll wait.
.
.
.
It’s my own server! Kinda. Did you guess right? Ok, ok, just let me explain. It’s not actually my own physical computer, that would be silly of me, my home server is only up about 80% of the time, and is vulnerable to all kinds of failures, never mind the fact that I break the software on it all the time. My computer/server is my tinkerbox, it’s where I’ve learned all the awesome computer stuff that I know, so there’s no way I’d let web traffic crash it. But if it’s not really my server, how can it be my server, you ask? Well, there’s this magical thing called cloud computing, and Amazon’s kind is the best.

Enter Amazon Web Services

You know, me and Amazon, we’re cool. These are the things I like about Amazon:

Okay, so it’s not a very balanced relationship, but hey,what can you do? Anyway, they’ve got this thing called Amazon Web Services, which I’ve known about for a while now, but never really started using, because even though I knew it wasn’t all that expensive, it just seemed like I didn’t have the needs that mandated cashing out for their services. Turns out they have a free tier that lasts for a whole year! And what’s this free tier like? Lots of ads, limited to no functionality, the usual shazam, right? Not at all! I have not seen a single ad thus far, and with the free tier, you can:

Run up to two micro Could Computing Instances (EC2)

Have up to 30GB of persistent Elastic Block Storage (EBS)

Reserve one elastic ip (read: static ip), free for life!

Run all kinds of operating systems on your EC2 instances

Run the instances for 750 hours a month! (That’s 31 days, or all month long baby!)

Lots of other stuff I don’t even know what does yet!

So that’s what I’m doing now. The learning curve is kinda steep, took me about two days to figure out enough to get this stuff working, and a lot of trial and error. RIP all you failed EC2 instances, I’m sorry for my incompetence. Anyhoo, how about when the free trial ends, you ask? Well, I done crunched the numbers, and it comes out to like ten bucks or so, and that’s supposing I don’t come up with a clever caching method to keep stuff from being read from the permanent storage as much as possible.

Now, it’s not like I’d do all this just so I could have complete control over my website (I totally would, actually), oh no, there’s much more to it. See, what you see is this website. What I see is my own server pushing out my own content. Pretty sweet, but allow me to underline the important part there. What I see is my own server pushing out my own content. It’s basically a nice little box with ridiculous bandwidth and impossibly fast disk access running GNU/Linux, and I can do whatever I want with it. So what have I got it doing for me, besides serving up this website? Well, it’s a git server, for one. My source code is scattered around the web, because different projects called for different services. Now all I have to do is install a Linux package or two, and I’ve got the service I need, all coming out of one place, namely supercharged BRBcoffee.com. I know unauthorized people won’t be able to peek at my stuff, because people I don’t explicitly allow aren’t even able to reach the login screen. I’ll sure as hell be using it as a vpn when I’m on public wifi, the speed hit will hardly be noticeable. I’ll be serving all kinds of appdata from here when my apps start popping up in the Play Store. It’s everything and anything I want it to be, and that’s the beauty of it!

I think that’s enough gushing for one night, and I gotta get up soon. In the meantime, you go check out AWS, and start your free trial.

Oh, what am I talking about, you won’t even be able to read this until the DNS refreshes.

Song of the blog: You know, I didn’t even listen to music while I wrote this, but have my new favorite song anyway. 君に願いを

I’ve finally gotten around to paying the horrible price of 25$ for an Android Developer License. I’m working on a presentation program which can be downloaded for free for PC, Mac, and Linux, and download a remote app for your phone. The app is quite simple, with just a few buttons to control the computer program. The trick is that you can connect to your computer both over bluetooth and wifi, such that even if you do not have access to a wifi you can still connect to your phone and look professional. I would estimate that I am about 70% done with the development process, and I have learned quite a lot about Android networking while working on this.

The developer name is BRBcoffee, and users will be able to download the computer program from this site. Sadly I will not make the app available outside of the Google Play store, as I cannot compete with the Goog when it comes to update functionality.

At first I will not be supporting notes in powerpoint presentations. If I do implement it you will be able to click a button on your phone to show the notes for the current slide. I can imagine that a lot of users would want this, but it would definitely make the app less user friendly. The vision is that you won’t need any kind of technical know-how in order to use the app, that it will rely mostly on icons to convey meaning, and as little text as possible.

If I am to develop an app for the iPhone I would have to earn enough to continually pay for an iOS Developer License, as this will cost four times as much(!) and still reach fewer users..

Merry Christmas y’all! Did you have a good holiday? I got 10 days back with my entire family, and my brother’s girlfriend spent her first Christmas in Norway with us. It was all pretty fantastic. I got a limit break’s worth of stuff, apparently that’s what Christmas is about now, but I’m not complaining. The present I appreciate the most was also the simplest, and about the only thing I really knew I wanted beforehand: a set of knitting needles and some yarn.

So that’s what I’m doing these days, I’m knitting. I haven’t been doing this since elementary school, so I needed a project that would let me get back into the stuff, and that would allow me to practice. Can you guess what it is? I suppose everyone starts with this, so it’s not really original or anything. Here’s another hint:

Wow, my Jelly Bean ROM’s camera is bad!

So it’s a washcloth? Nope, it’s gonna be a ridiculously long scarf! That’s right, Burnie’s making a scarf for himself. Are you surprised by the choice of color? I got the tools and the yarn from my godmother, and she said she didn’t even consider any other colors. Apparently people know me. I got three balls of red yarn, but It think an entirely red scarf will be sorta boring. It’s too late to make it a Doctor Who scarf, but I’m definitely making that later. I am heading to a crafting store today and getting some more colors for sure, I can make red flags for the revolution when it draws closer. I’ve joined ravelry after someone in the #desertbus irc channel suggested it to me, and I’ve found some really cool patterns already. Just try and tell me you don’t want this black mage pattern for your oven mitten thingiemajigger, what do you even call these?

In other news, I’m removing the comment section. Everything doesn’t need to be commentable on the internet. If you want to comment on a post, tweet about it! You can even get us involved by mentioning @BRBcoffee!

So I finally went out and got a usb pen with more than 2Gb worth of space on it, and I did this really just for one reason: I wanted to try out this thing I’d seen over at hak5 a long time ago. This thing that I wanted to try out is the ultimate hacker tool, the multipass.

It’s time to put our white hats on. Go ahead and make yourself a good cup of coffee to enjoy before reading ahead. It isn’t a very difficult process, but coffee and hacking go well together 🙂
To put it simply, the concept is that you want one usb stick with many different tools on it. Usually, if you want to put a tool like Ubuntu on a usb stick what you do is use unetbootin, or a linux tool like dd, and write the entire disk image to your stick, and that’s it, you’ve got a live usb stick, and you can use it just fine, but it’s really not that versatile, and it’s not a very efficient use of 16Gb of space. If you want to try a different system you have to start all over again, and you lose any customizations you’ve made to your live system. So, hak5 ran this episode where they showed how to get around this using GRUB, the standard linux bootloader. Now, they used legacy GRUB, which is ancient technology, so I opted to try doing it with the newer GRUB2 which is a beautiful modular replacement. Later on I found that on the hak5 forums they’ve got guides for using GRUB2, but most of it is still centered around the old GRUB. This might be because doing it with GRUB2 is really easy, especially if you’re already familiar with GRUB. So how do you do it?

I will assume from this point on that you’re working from a linux environment, but most of this can easily be done from Windows as well, just google it!

Format your usb stick.

Fire up your favorite partitioning tool, preferably one with support for linux filesystems, though fat32 should work as well. I recommend Gparted. You want to format your usb stick with an MBR table, and one partition formatted to ext4. For good measure you can also add boot to the partition flags. You can have another partition for storing data, but it’s not necessary, you can store that on your primary partition.

Install GRUB

The first thing you need to do is figure out what your disk identifier is, and mount that disk. After that you will do the actual install of GRUB. This will write to the boot sector of your usb stick and add a boot folder with modules for file systems and graphics, nifty stuff! So, here’s how you do it:

sudo fdisk -l

You’ll get some output showing information about your disks. You’ll probably have a few partitions that start with /dev/sda, and then your usb will be /dev/sdb or /dev/sdc if you have more than one usb connected. Based on the information you will be able to tell which is your multipass. The entries with numbers on the end are partitions, so you want both /dev/sdX and /dev/sdXY where X is the letter and Y is the number. Once you know that you’re ready to move on.

So we’ve got GRUB installed, but we still haven’t got any operating systems on there yet, so go ahead and download your favorite tool. Just for simplicity I’m going to be using ubuntu as an example, but the options are virtually limitless. Once we have our Ubuntu.iso we’re going to make a folder on the usb stick called iso, and copy the iso file into it. Afterwards you go into /mnt/usb/boot/grub and create a new file called grub.cfg. This is where you add boot entries and a lot of other good stuff. For now I’ll show you how to do a basic boot entry, and in a later entry I’ll show you how to theme it to your liking. So about that grub.cfg file:

root (hda0,msdos1): We’re telling grub to use the first partition on our usb. It’s hda0 now, instead of sdX.loopback loop /iso/Ubuntu.iso: Loop is a handy tool familiar to many linux users, it mounts an image as if it were a partition.linux (loop)/.../vmlinuz: This is the kernel line, telling grub where the linux kernel is within the mounted (loop) system. Different tools put this in different places, but for all ubuntu based live tools it’s always under casper. The stuff after vmlinuz is options passed to the kernel, and will also be different for different tools.initrd (loop)/casper/initrd.lz: The filesystem to be loaded into RAM and passed to the kernel for startup.

The options after the linux kernel line will vary somewhat from tool to tool, but not by a whole lot. Again, the guys over at the hak5 are pretty much the authority on this stuff, so if you’re having trouble getting a specific tool to work, just head over there and someone is likely to have a working config there. If you want to add another tool to your multipass all you have to do is move the iso to your iso directory on the multipass and add a menuentry to grub.cfg. In most linux systems updating grub.cfg is done with automated tools, but for multipass you want to edit it yourself.

Fun fact, this blog was written on a lubuntu live from my multipass. I went back into my primary OS in order to grab this screenshot of my bootloader though. As you can see I’ve kinda messed up the font and hightlights, but you get the gist of what’s possible 🙂

Hello peeps, what’s up? I know right, two blog posts in the same year, what the hell!? Well, it has been documentet on several occasions that I get very productive during exams, I just don’t direct my energy towards the exams themselves. Hell, this whole blog project was started the day before a final exam back in high school. Anyway, you’re probably wondering what the title has to do with this, which is almost nothing, except that exams are closing in, and I’m doing cool shit that I want to blog about.

I’ve had this magnificent tablet that I’m typing on right now for a year, I think, maybe a year and a half, and it’s pretty rockin’. I’m an android power user, if such a thing exists, starting out on the HTC Hero, and staying there long past its expected lifetime, because I refused to spend money I didn’t really have on a new device, opting instead to flash unofficial ROMs from the lovely people over at the xda forums in order to stay with the times and the new features that came with new versions of android. God, I can’t even imagine the pain I’d experience if I had to go back to running Cupcake (android 1.6) on my Hero again, that’d be a nightmare! Anyway, at one point I lost my phone when I was in Oslo, and I had to purchase a new phone. I was pleased with my Hero, but I took it as an opportunity to make an upgrade, going with the Desire Z, which still to this day has the best qwerty keyboard of any phone on the market. That phone was rooted within an hour after I bought it, and it now runs a recent build of Ice Cream Sandwich (android 4.0). The keyboard is essential, but I’ll get back to that later. My point is that I love android. Any loyal readers will know that I love linux, and would install it on myself if I had a usb port and a network connection, and now I have this tablet thingie, with a keyboard dock that I got last christmas, and I’ve been using it on and off as a productivity device after my netbook’s battery died (fun fact, my netbook is also running a recent version of ICS from the android-x86 project). Now, while this gives me a nerdboner, tablets have limitations. The system isn’t really meant to be a replacement for your desktop OS, and working around these limitations at this point can get tiresome, and if you’ve ever opened up a terminal emulator on android, you’ll know that while it is running linux, it’s pretty barebones stuff. BUT! It is linux, and where there’s linux there’s a way.

I read a blog post a few days ago, I’ll link to it if I ever find it in my history, about a man who’d switched his workflow from a macbook to an ipad, and loved it. Now, this poses some problems for a computer engineer, but none that can’t be overcome with relative ease. I say relative, because you do need to be comfortable with the command line interface. Quick, think, what do you have stored in the cloud? I’m going to make an educated guess, and say you have music somewhere, email, probably some shared documents on Google Drive, and pictures in Picasa or Flickr. But that’s just for storage right? Well, yes, but they’re stored on computers, and if you take those fancy schmancy services away, you’re left with exactly what I need in order to work effectively from my tablet, a linux server with none of the hardware and system limitations of my android tablet. The guy who wrote the blog post was working from an ipad, and he was leasing a server (for pretty damn cheap) system called Linode. Now, I’ve looked at this before, but even if it’s cheap I just don’t feel that I can justify the extra monthly purchase. Luckily, a solution has been there for me all along, I just didn’t think about it much: I have access to the unix servers at the University in Stavanger! I got access way back in my freshman year! These are pretty powerful machines, able to handle the workloads of many students and employees simultaneously, and the internet speeds I can enjoy from them are out of this world. When Google told me syncing the android source tree would take an hour, I farted in their general direction, and then the sync was pretty much done. I’ve lost my train of thought, where was I?

Oh, yes, I have access to powerful machines though ssh, the secure shell protocol. All I needed was an android client, and I should be golden. Of course, this wasn’t exactly the case. The one thing people always bring up as a negative aspect of android is that it’s fragmented. As opposed to iGadgets, which are all produced by the same company, android gadgets are produced by a wide spectrum of companies, and they don’t allways see eye to eye when it comes to how to implement things, so you get things like tons of different keyboard layouts. I mentioned that my phone has the best keyboard out there for phones, but that’s just my (and HTCs) opinion. Samsung probably has a different idea, and Motorola a third, which is reflected in the keyboard dock I have. Now, I had downloaded an ssh client called ConnectBot, a great piece of software, except it doesn’t really support hardware keyboards that well, having been designed for a system that deals primarily with on-screen keyboards. It has a few workarounds for adding modifier keys (such as ctrl, alt, shift), but my keyboard actually has these keys, they just aren’t registered by the software! ARGH! There are even some bugs with this in the operating system itself, but the tablet comes with a software keyboard designed by Samsung that allows everything to work great. Except ConnectBot can’t know this, and can’t be designed to work with every single keyboard program for android, because there are, like, a thousand. Really. So I got frustrated, I needed keyboard shortcuts in order to use the programs that make working in the linux cli (command line interface) awesome and effective, but none of them were working! I downloaded experimental versions, I complained in the irc room, no one answered, and I downloaded more experimental versions and other programs. Nothing worked, and I was starting to feel jealous of the iPad guy, I was in a bad mood. And then I had an idea, why don’t I try to change the software keyboard? Ta-fucking-DAAAAA! Works like a charm. Well, alt key interactions don’t work, because this norwegian dock only has the alt-gr key, and I still have to use an experimental tablet version for it to work, but other than that, all is dandy! So, I bet you’re all wondering, but what can you do with it!?

What I can do with it

I can connect to a powerful machine from anywhere in the world!

I can use Gnu screen, a tool that lets me have many terminal windows open at the same time, and switch between them quickly.
Screen is cool for another reason, it keeps all my terminal windows, even when I log out, even if I lose my internet connection, even if I burn my tablet.. Say I’m working on some files, have a blog post open in emacs, and I’m compiling a large project, when my tablet unexpectedly reboots. If I’d have been working locally, that would all most likely be irrevocably lost. Now, I can go make a cup of coffee, run down to the library, open up a portable ssh client, and log into the system again. It’s all there, and hey! The program is done compiling! Screen keeps doing shit while I’m not logged in, and that’s awesome Holy shit that’s a lot of emphasis in one bulletpoint, but Screen is just that good.

I can keep my cool. Serious programmers are likely to have some serious computing power sitting at home, churning away at their programs, and it gets hot, seriously hot. When I’m working from my tablet, it’s not actually doing anything intensive, so while the heavy machinery on campus is running laps around your computer, my battery will last all day. I don’t need more than this single-core ARM processor (over)clocked at 1.4Ghz.

I can goof around. While Screen is making sure that my shit keeps running on campus, I can disconnect and play some smooth games on my tablet. I can’t stress this enough, my tablet is completely unaffected by what the server is doing!

I can never buy a normal computer again. I will though, I need to play Diablo III.

I can compile the linux kernel in less time than it takes me to go to the store and buy donuts.

I can check the progress on the linux kernel compilation from my phone while I’m going to the store! Yes, my phone can connect via ssh too, android is android, and the keyboard on the DZ is sweet enough that if the compile failed, I can change a few small things around and try again before the cashier can offer me my receipt.

I can fly! Well, that’s not true, but I can make a server farm output this:

I can do more, but this blog post is already much too long. See ya on the other side!