Piping to stdout and file simultaneously

Just another note to self here:

./[program] [arguments] | tee [filename.txt]

Run program with arguments, use pipe “|” and the program named “tee” to output do both stdout and a particular file. Great for logging terminal programs.

Flags:

  • -a Appends the output to the end of File instead of writing over it.
  • -i Ignores interrupts.

Since it’s a GNU-core utility, “man tee” gives a manual of the program.

 

Ljusterö

I just recently spent a few days at the island of Ljusterö just outside of Stockholm.

Since I’m still waiting for my DSLR-charger I chose not to bring it, and as luck would have it, I had to take these shots using my cell phone camera.

Still I find myself pleased with the results, so here goes…

Mounting shared folder

mkdir ~/Documents/VBShared


#!/bin/sh

mount -t vboxsf VBShared /home/$USER/Documents/VBShared

Save this as a file, such as “mount.sh”

$ chmod +x mount.sh

$ sudo ./mount.sh

I’m writing this as a reference for every time I make a new Virtualbox guest linux machine

Install guest additions.

Make sure settings have a shared folder set with automount enabled.

Run script at startup.

 

For systems without an X-Server:

Make sure sufficient packages are installed. Build essential is useful.

Click on “insert guest additions CD image”

sudo mount /dev/cdrom /mnt
sudo /mnt/VBoxLinuxAdditions.run

Bubbles

It’s been over a year. So long, even though I’ve been working on this page several times.

So what’s new?

I’ve started studying computer science at the University of Oslo, and spent most of the year learning about Java.

Only recently did I read up on applets in a book on game programming and found it so much easier than the troublesome JSF stuff I was reading up on, but I guess it’s probably like that for a reason, as I noticed applets are a real pain on the user side.

I’ve also registered for VPS to get a platform for programming experiments

As I haven’t had a chance to secure my server with SSL yet it’s probably “impossible” to run for most people (took me at least five minutes to get my Macbook to accept the applet).

After that I thought I’d try and play with it in photoshop. to my surprise a simple filter managed to turn the letters into bubbles:

Hopefully, later on I’ll be making some more interesting applications or applets. Looking forward to the next challenge at uni where we’re supposed to make an automatic Sudoku-puzzle solver.

Of sound mind …

Yes yes, not much happening as usual. It’s Sunday in August and just browsing my hard drive for old music projects and noticed I haven’t shared much in a while, so why not upload a short little theme I wrote for the piano a while ago.

What’s up?

“Twenty-five years I’m alive here still
Trying to get up that great big hill of hope
For a destination”

 

OK then, I admit it, I’ve had a bit of a 90’s alternative rock phase on Spotify lately.

 

And what else? Well, I just heard I’ll be writing my master’s degree in the oldest university of Scandinavia (Uppsala Universitet) which is fun seeing as I’m a history student… of sorts.

 

And I also wrote this little track in FruityLoops – nothing like a little modular synthesis and digital automation:

Pen and ink

I guess it’s been a little while since I last did anything to update my page here, and in part I think it’s because I’ve spent a lot of time working on applications and portfolios for higher education.

Now that that’s finally finished I just found the time to upload a few samples of what I’ve been doing lately under my “Pen and Ink” page.

Weekend at the internets

I just realized I’ve spent the whole weekend trying to polish up on the WordPress theme here (the layout of the page) – and I haven’t even started looking that much into code functionality. As of yet, I’ve been able to make this theme:

  • Widget friendly
  • Plugin friendly
  • Able to change website name and description using the Settings panel in the WordPress dashboard.
  • Make admins able to edit individual pages with an “Edit” button below each post and page.
  • Featured permalinks both in title and seperate “Permalink” button for each individual post.

Yet still I have to admit I’ve spent most of the time fixing up CSS – recent changes involving.

  • New background (not just the clock, but cogwheels and whatnot further down the page for a bit of variation)
  • Styled Links to make things look cleaner and without all the underlines and everything.
  • Changed brightness of background as well as “window” density with a 85% transparent background for content instead of just 70 like it used to.
  • Changed caption formatting.
  • Removed published-dates for pages, so that it only shows for individual posts.

PS: I’ve also made an alternate version of the theme with inverted light colours, available HERE!.

Lorem ipsum

 

“Lorem ipsum dolor sit amet, consectetur adipiscing elit. In mauris nisi, lacinia bibendum semper id, euismod sed ipsum. Nunc nibh mi, euismod id ultrices eu, posuere eget lorem. Proin ac orci tortor. Nam porta felis in neque tincidunt dignissim vel bibendum justo. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque blandit diam in metus sollicitudin sagittis. Pellentesque a mi vel magna lacinia pharetra sit amet vitae sem. Aliquam erat volutpat. Integer blandit, nibh ut dignissim elementum, nibh lectus vestibulum nunc, id dignissim dolor turpis et risus. Nulla ut dapibus massa. Aliquam lectus nisi, tempor in aliquet eu, consectetur vel odio. Fusce vitae lorem purus.”

 

So what’s all this Lipsum about?

And that short post stating the layout is finished?

Well, thing is – I finally got around to learning enough about developing WordPress themes to make my own, and this “proof of concept” (the concept being that I – with no previous experience with PHP (and still no considerable understanding of PHP apart from a general understanding of HTML, CSS and Perl) will be able to make my own WordPress theme) being the result of several days of “hard” labour trying to make this work.

So how did I do it without really knowing all that much PHP?

Well – the good thing about programming and markup languages is that once you know at least parts of one, you can pretty much get along using logical reasoning to get by – especially with a bit of cutting and pasting from the WordPress documentation pages as well as using simple themes as models.

Hopefully this theme will be able to be released for the general public – that is: the WordPress theme database if they chose to accept it (I probably have a lot of cleaning up to do with the code and everything), but for now, I think I’ll add a download link … HERE.