Wake Me Up Spotify 0.2

January 25th, 2010 Marius No comments

I’ve fixed the biggest bug from the previous version of Wake Me Up Spotify; it is now possible to use a playlist to wake you up! The fix was simple, and like the rest of the app, a hack. It just closes spotify 2 minutes before you want to wake up. Then it reopens it again (T minus 1 minute), and starts playing at the specified wake up time.

The latest version can be downloaded here: WakeMeUpSpotify 0.2.0.1 (zip)

Using Wake Me Up Spotify

When you start Wake Me Up Spotify for the first time, a yellow banner (1) at the top of the app will indicate that you need to locate Spotify on your computer. Click on the banner, and find the folder where Spotify is installed (usually C:\Program Files\Spotify). You only have to do this once.

Now you need to specify the time you want to wake up at. Enter the time (in hours:minutes) in the small text box (2). Next you need to find a song or playlist that you want to wake up to. Open Spotify and find a song or playlist, right click it, and click “Copy Spotify URI”. Then paste it in the large textbox in Wake Me Up Spotify (3). Now you are ready to go to sleep!

You can hide Wake Me Up Spotify by clicking the minimize arrow on the toolbar. This will minimize the app to the taskbar (the bottom right corner of Windows). The app will still run from here. If you close it, it will not wake you up.

Categories: Wake Me Up Spotify Tags:

CentripetalBox

January 15th, 2010 Marius No comments

I just received my first ever 3D printed object from Shapeways, a CentripetalBox. Shapeways provide a cheap and simple way to 3D print anything you can imagine in a variety of materials, including ABS (like Lego), stainless steel and even color printed 3D objects. This is the first time I have 3D printed anything, so I was quite excited, but at the same time expecting a designflaw showing up in the finished product.

The design I got printed was a CentripetalBox, a cube which needs to be spun around quickly to be opened. You can see a video of how it works below. The original design had 4 plugs which would fit inside the 4 slots in the box and lid, but due to the inaccuracy of the printing process, the plugs where slightly too big. The lid was also a bit too big, and needed to be sanded down slightly to fit inside the box. This was expected, but what was not expected was how tough the material was. I printed in White, Strong and Flexible, and while the surface is quite rough and seems fragile (small particles of the raw material powder will come loose if you scratch it), the actual box is pretty solid. I tried sanding down the plugs so they would fit inside the slots, but quickly moved to a file instead. A Dremel might have been a good tool to have handy. Instead of using the printed plastic plugs I used a thin steel rod cut into plugs. It might even be that the plastic plugs are too light to work. A few more days of sanding/filing, and I’ll know.

CentripetalBox componentsThe rought texture of the WSF material

Having discussed the end result and design with my dad, we came up with some improvements. I’ll make a new version for the Shapeways shop with those improvements (and bug fixes, like smaller plugs, and a tiny gap between the lid and the box). This is the first thing I have ever made in Blender and then 3D printed, and the fact that it works (with a bit of post-production work) is more than I expected. I have a few other ideas for 3D printing, and I’ll work on them this spring (or autumn, if you are in Australia).

Get the Flash Player to see this player.

Categories: 3D printing, Uncategorized Tags:

Very simple CMS: project category

November 24th, 2009 Marius No comments

I made this blog to have a place to post the applications and programs I have made, and for that I needed a Content Management System (CMS). I looked at some CMS plugins for Wordpress, but most of them are overkill for what I need. Instead I decided to use the built inn Categories of Wordpress. I created a category called Project, and for each project (a program, website or anything else I made) I would add a sub-category with that projects name. With this simple method I could create several posts describing the progress of a project. Now all I needed was a page with all the projects listed, and maybe the latest posts for each one.

I solved this by making a page Template (not to be confused with Theme, which is something completely different). The template lists all the subcategories of a category, specified in the page metadata, along with the category description and the last 5 posts for each category. This way you can list all the projects on one page and link to the most recent information for each one. Because the category name is specified in the page metadata, you can have multiple CMS pages, for example, ideas, projects or experiments.
Read more…

Categories: CMS Tags: , ,

Wake Me Up Spotify

November 19th, 2009 Marius No comments
Wake Me Up Spotify Screenshot

Wake Me Up Spotify

This simple app lets you wake up to your favorite song or playlist by using Spotify as an alarm clock. Just set the time you want to wake up and the Spotify URI you want it to play, and your done. It will automatically open Spotify and start playing, and you can minimize it to the tray so it stays out of the way.

This is the first program I’ve ever made in C# and WinForms, so it’s pretty simple. Most of the development time was spent making WinForms look nice, something it’s definitively not designed for. For example, to add the nice shadow around the app, I had to sacrifice the blinking caret in the textboxes. Styling textboxes is also pretty difficult, so the simplest thing is to position so they line up with a background picture of the form. The rest of the time was  spent making it work with Spotify, using the Spotify Remote API. Spotify gives you very little control; I’m only able to play, pause, stop, play next and previous song and change the volume. To play a song specified by a Spotify URI I have to start Spotify with that URI as argument.

The program still has a few bugs, so don’t use it as the only way to wake up. For example, while it is possible to play a song at any time by starting Spotify with a song URI, it is not possible to make it play playlist when it is already open. If you want to wake up to a playlist, make sure you close the Spotify before you go to bed!

Download WakeMeUpSpotify (65kB)

Categories: Wake Me Up Spotify Tags: ,

Regex Renamer

August 17th, 2009 Marius No comments

RegexRenamer

This week I set out to make a simple batch application for renaming files. Specifically I wanted to rename folders containing episodes of a TV-show. These files tend to have very ugly names, containing the name of the show, the season and episode, the guy who uploaded it and the file type. I want my collection to contain prettier names, and so I decided to make a batch renamer that could make the folder look more appealing.

I decided to make the application using XUL Runner. XUL Runner is made by Mozilla, and is essentially what Firefox and Thunderbird runs in. It lets you create an GUI using XUL, JavaScript and CSS and then run it as an application. Having made a few extensions to Firefox in my time, XUL was a familiar concept and it didn’t take long until I had a simple working version.

Regex Renamer lets you pick a pattern from a drop down list. It will then look for files that match the regular expression, and renames only those files. This means that if you have a folder where all the files have similar names, then you can rename all of them with a single click. The application also lets you create custom patterns, import and export the list of patterns from/to a file.

It’s not the most user friendly application in the world, and it could do with some work on editing the pattern list, and maybe have a cheatsheet on regex built inn. But for a simple application that took less than a week to code up, it works pretty well.

You can download the application for windows below. It should run on any system that XUL Runner runs on, which would include Windows, Linux and OS X, but you need to download XUL Runner for the last two platforms.

RegexRenamer

Categories: Regex Renamer Tags: , ,

EcmaCalc 0.4

March 25th, 2009 Marius No comments

I have made some updates to EcmaCalc, and it’s reached version 0.4. The new features includes:

  • Abortion of long-running scripts
  • Syntax highlighting (still a bit buggy)
  • Help

There are a few bugs left to sort out, but this version is a lot better than 0.1, so I decided to release it. If you notice any bugs or have any new ideas, post them in the comments.

EcmaCalc 0.4

EcmaCalc 0.1, A better calculator for Windows

August 4th, 2008 Marius No comments
EcmaCalc 0.1

EcmaCalc 0.1

I’ve used the built in windows calculator for years now, but it’s missing some important features. So I made EcmaCalc, which is a pretty stupid, short, name for EcmaScript Calculator. It implements QtScript, which is based on EcmaScript, which is based on JavaScript. That is, you can write JavaScript code in it. This means you can write expressions, functions, loops and create objects and arrays to make your calculations.

For example, you can enter 7*9 and hit the Execute button (or F7) and you will get the answer (in green, on the right). Or you could write something more complicated, like (7+1)*(3-5)/(8+2). You can store the results in variables, just like in JavaScript, like var a = 7+8;var b = 3+2; var c = a * b;.

There’s a lot more you can do, like functions, objects, arrays and loops. There are a few built in things, like the ans variable and the answer and result arrays, which will return the last few results of your expressions. There is also a print function which you can use to print stuff in the middle of loops.

I haven’t written the help yet, because this is an early version. If you find any bugs or have any comments, then please share them.

EcmaCalc 0.1

Hello world!

August 4th, 2008 Marius No comments

Wikipedia has a list of “Hello World” in every programming language imaginable!

Categories: Uncategorized Tags:

Marius Gundersen is Digg proof thanks to caching by WP Super Cache