Changing date and/or time on Linux

Here’s a short and easy way to set your system and hardware clock from the command line.
Open your terminal and follow these steps.

First check the current time of your hardwareclock:

hwclock -r

Then add the right date/time to your systemclock.
In the example provided you’ll find some strange long number.
You have to read it like this (from left to right):
[01] = month (Jan) | [14] = day | [0231] = time (02:31) | [2011] = year

sudo date 011402312011

Now sync your hardware clock with the date/time you’ve just set:

sudo hwclock --systohc

Check if the hardware clock is synced right:

sudo hwclock -r

Profit!

Politics in Belgium are grinding my gears

I’m not sure how to blog about this without giving the wrong impression.
Last year, when I was in Spain, I had a talk with people from all around the world about Belgian politics.
What I found was some bizarre mix from people not knowing what/where Belgium was to people that were worried about our upcoming civil war.

To make this clear, THERE IS NO SUCH THING AS AN UPCOMING CIVIL WAR IN BELGIUM! That’s just some reporter or news agency trying to make themselves more interesting than they are.
Like half of the country speaks French and the other part speaks Dutch. That’s all there is.
That’s no big deal. In India, they have 7 different languages, in Spain they have 2, etc… (put them in the comment below if you know some more examples)

The only downside of this, is that politicians use this to make a name for themselves.
The language issue is being milked out by unprofessional politicians that don’t want to do their job!
To clarify this, it’s already been 212 days that we’re without a Government.
Somehow, most of the people in Belgium don’t seem to care anymore. Which is a bad thing 🙁

This video (dutch) explains exactly how I feel about the matter:

This guy is asking for the people to go out and demonstrate to let the politicians know, we’re not paying them for sitting around pointing fingers.
And I think, he’s damn right!

ASP.net GridView to display DetailsView on other page

So, I’m still working on that immo website.
On some GridView.aspx page, users see a GridView  with all items in my database.
I added a select button in front of each row.
I want the to redirect the user to some other page DetailsView.aspx when he/she clicked the button.
The problem, there is no redirect option in the GUI.
Again, Microsoft… loose the markup options in the Properties window and add some more functionality.

The solution for the people out there with the same frustration:

Double click the GridView item in your GUI.
You’ll get something as:

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged

End Sub

Now add the following code (note that this is in vb, so if you use C#, adjust the syntax)

Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged
           Response.Redirect("DetailsView.aspx?ID=" & GridView1.SelectedValue)
End Sub

You might also want to add or modify some lines in your sqlDatasource (of the destination page) to match these lines.
This way you’ll see the DetailView of the item you clicked in the GridView.

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
 SelectCommand="SELECT * FROM [Tablename]where [ID] = @ID"
<SelectParameters>
 <asp:QueryStringParameter QueryStringField="ID" name="ID" />
 </SelectParameters>
 </asp:SqlDataSource>

ASP.net mess

I’m currently working on some basic Immo website, in ASP.net 4.0.
(Part of the Exams)
I have to admit, programming is not my cup of tea… but I’m getting frustrated over all those (minor) flaws in Vistual Studio 2010.

If you’re setting up a registration page using the CreateUserWizard form the Toolbox, you’ll find some lack of properties-fields in the GUI.
In my case, I had to assign a default role to each new registerd user.
Nowhere in the Gui there is such thing to be found… sure… changing colors etc… but some REAL functionality… forget it!
The way to go is like this:
Just add some chunk of code.

Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
            Roles.AddUserToRole(CreateUserWizard1.UserName, "Member")
End Sub

I’m some kind of disappointed.
If you create some Wizard, why not do a good job, and add all possible options to the GUI?
Should you find yourself having too many options… perhaps, get rid of the image and color options?
There is such a thing as CSS for that!

Grmbl….

Hello again.

Hello dear blog.
Missed me?
I’m sorry I was away for quite some time now.
A lot has happened since my last post.
I moved to another flat, got a new girlfriend, new computer, new ISP, etc…
With some regret I have to admit, I feel sorry for not telling you about all this.
But I promise, in the next couple of days, I’ll try to give you an update about all that’s new in my (digital) life.

Especially the story where I ended up buying a new motherboard is quite good.
But you’ll have to wait for it a little longer 😉
For now I’m going to enjoy some malted drinks.

Cheers!

PS: Mom, I’m still alive! 🙂

Create a .gif with The Gimp

This is requested by my dearly beloved mom, so I’ll keep it simple and mom-friendly.

The things you’ll need:

  • A Computer
  • The Gimp (Windows & Linux compatible)
  • Some pictures/images (preferably of the same size)
  • A (very basic) knowledge of what a .gif is
    A .gif is actually a little slideshow of images.
  • 5 minutes time
    or 10, depending on how fast you can switch between open windows.

Get started:

  1. Open up The Gimp
    I suppose I don’t have to explain how to do this?
  2. Open up the folder where the images are that you want to be inside the animated image


  3. Drag’n’drop the first image into the big empty Gimp window (the image you want to be displayed first in your ‘presentation’)
    If the order of the images don’t matter, just select all the images and drag’n’drop em all at once.

    • Press, and hold down, the button on the mouse or other pointing device, to “grab” the object,
    • “Drag” the object/cursor/pointing device to the desired location,
    • “Drop” the object by releasing the button.
  4. Drag’n’drop the second image into the big empty Gimp window (the image you want to be displayed as second in your ‘presentation’)
  5. Drag’n’drop the third image into the big empty  Gimp window (the image you want to be displayed as third in your ‘presentation’)
  6. Drag’n’drop the fourth image …. ok, you’ll get it now!
    Continue doing this till you’ve dragged all your images in to that window.
    You can check how many and which images are already in there in the Layer window.
    Open it by clicking ctrl+l or going to file\dialogs\layers.

  7. Click “File” in the top menu
  8. Click “Save As”


  9. Choose a location where to save the final .gif file
  10. choose a filename that ends with “.gif ” (eg. “ChoopDaWhoop.gif”, without the quotes ofc.)


  11. Select “Save as Animation”


  12. Fill in the comment, or just un-check it. (probably no-one will ever read it)


  13. Select “Loop Forever”

  14. Choose a delay value (this will set the time before switching to another image)
    Check out the image at point 13
  15. Click save
  16. Profit!

Sintel trailer released.

So, if you haven’t heard of Sintel before, this is nothing too soon.
Sintel is a project just like Big Buck Bunny, that’s completely made with Free and Open Source software.
It’s more or less a promotion movie for Blender, that’s also why the Blender Foundation is sponsoring the project.
For those that don’t know Blender, should check it out.
It’s a Free and open source 3D content creation suite.
For all those people that are still thinking that still think that huge and task specific applications are only available for huge price’s and delivered by closed private company’s, this is your turning point.
In less than 2 months the full Sintel Video will be released… I can hardly wait.
It’s also fun to check the video’s on the BlenderFoudation youtube profile, it’s full of interesting reactions and insights.

Also be sure to check out their custom server rack:

Ubuntu 10.04 (Lucid Lynx) Release Party Ghent is under construction

It’s official! There will be a Release Party for the Ubunu 10.04 (codename Lucid Lynx) in Ghent.

I’ve just send out the news to the mailing list of Ubuntu-be and the Whitespace to confirm that i’ll organise the release party for the upcoming LTS version of Ubuntu.
The event will take place Thursday the 13th of May in the Whitespace.
I’m still looking for people whom have some knowledge of something Ubuntu-related and have the guts to give a lightningtalk or a demo.
At the moment of writing, I’ve had 1 confirmation from a guy with Balls! Mandel.
He did a talk about desktopcouch at fosdem this year, and will bring an improved version of that to the Release party.
If you have questions, let me know.
I’m available at the #Ubuntu-be channel on freenode, or just PM me (mimor) or use the comment section below.

The sent mail in English:

Hello to all.
>
> I organize a RP on the 13th of May in honor of the Ubuntu 10.04 (Lucid)
> release.
> This is indeed a Thursday 🙂 but that’s an official holiday and lot’s of
> the people don’t have to work on Friday.
> What time it’ll take place is yet to be decided.
>
> The RP will take place in the Whitespace (Blekerijstraat 75, Gent,
> Belgium)
> For people wondering what the Whitespace is: http://0x20.be
>
> The space has: power, network, internet, drinks, snacks, beamer, couches
> and I hope we can repair the coffee-machine by then.
> People whom want something else, mention it.
>
> The program is still under construction.
> This moment, my receipt looks like this:
>
> Around 13h we’ll serve a light meet & greet to loosen up the nerves.
> Next, we’ll stimulate the senses wit a series of lightning talks
> accompanied by a spicy serving of freshly cut tips.
> As the Spécial-du-chéf, you can enjoy some trial-and-error-sauce topped
> hands-on sessions.
>
> This part is for sure, but the rest is still work in progress!
>
> This is the rest:
>
> – design of Posters, flyers and web-banners
> – do you know someone, or want to present something yourself? Go for it
> & let me know.
> – spread the word! To your friends, colleagues, your student-club, etc..
> – the pleasure to have YOU with us!
>
> Regards,
>
> Mike Morraye

Or in Dutch:

>
> Hallo iedereen.
>
> Ik organiseer Donderdag, 13 Mei 2010 een RP voor Ubuntu 10.04 (Lucid).
> Dit is inderdaad een donderdag 🙂 Maar het is een feestdag en vrijdag is
> voor velen dus een brug-dag.
> Van hoe laat tot hoe laat is nog te beslissen.
>
> De RP gaat door in de Whitespace (Blekerijstraat 75, Gent, Belgium)
> Voor wie wil weten wat dit is: http://0x20.be
>
> Locatie heeft: stroomvoorziening, netwerk, internet, (fris-) drank,
> versnaperingen, beamer, zetels en hopelijk kunnen we tegen dan ook de
> koffiezet herstellen.
> Wie nog iets anders wil, laat het gerust weten 😉
>
> Het programma in nog in ontwikkeling.
> Op dit moment zit m’n recept er zo uit:
>
> Rond 13h serveren we een luchtige meet & greet om de zenuwen wat los te
> weken. Hierna prikkelen we de zintuigen met een reeks van pittige
> lightningtalks vergezeld van een portie vers gesneden tips.
> Als spécial du chéf, kunnen de fijnproevers genieten van enkele hands-on
> sessies overgoten met een sausje trial & error.
>
> Dit stuk is zeker, de rest is work in progress!
>
> Hier dus de rest:
>
> – ontwerp Poster & flyer en/of web-banners?
> – ken je iemand, of wil je zelf iets presenteren. Go for it & let me
> know.
> – Spread the word! In je vriendenkring, op het werk, in je
> studentenclub, etc…
> – het genoegen dat JIJ er ook bent!
>
> Mvg,
>
> Mike Morraye

Sorting images according to their width and height

I wrote a script to sort images according to their width and height.
I found myself in need of such a thing after my previous post on how to download 4chan images automatically.
I used this script a few times to get all the wallpapers on the /wg/ board.

After a few GB of images, nautilus starts to get a headache when opening the containing folder.
So I needed to split it up in different folders.
So here’s the script that does it.

There still seems to be a problem with character escaping when the filename contains a ” – ” in it’s title.
But I’m too tired to figure it out now.

Whitespace opening soon in Ghent!

Just got read this mail on the Ubuntu-be mailinglist and thought it would be a nice idea to post it here too 🙂

A bit off topic for this list, but there are a lot of ubuntu/fos-users
in the space,
so I assumed this can be interesting for ubuntu users.

Whitespace would like to invite you to its opening weekend 19-21 March.

When: From Friday 19th of March to Sunday the 21st.

Where: Blekerijstraat 75, Gent, Belgium

Whitespace is the first hackerspace in Ghent and will be opening its doors
for the first time on the weekend of 19-21 March. The space is ready for
launch, but far from finished: we’ve got a roof, multiple walls,  and some
cat5 and now we need more people to have fun with.

Don’t know what a “hackerspace” is? Check http://hackerspaces.org 😉

We hope to see you drop by.

The (dynamic) agenda[0]:
————————————

Friday:
20:00: Opening drink, see the space, meet the locals, fun hacker partygames.

Saturday:
14:00 : OpenWRT presentation: a big os for small devices.
15:00 : Flashing for fun & profit:
1 Bring your compatible wireless router[1]
2 Flash it! (don’t worry we’ll walk you trough).
3 …
4 Profit!
17:00 : Everything you always wanted to know about IPv6 but were afraid to ask.
18:00 : Open recipe burgers (with secret sauce).
21:00 : Evening entertainment: Powerpoint karaoke hosted by fs111.
After that : something involving liquids.

Sunday:
12:00 Hungry-Hacker is hungry. Breakfast.
15:00 lightning talks:
Such diverse subjects as: Google summer of code, The talk too trollish to
mention, How to get  yourself a lot of work that you didn’t plan by being
creative, Something about something, Awesome talk will be awesome, …
(open stage, schedule will be on the wiki, add your lightning talk there)

Registration:
Is not necessary but it would be nice to give us an idea on how many of you
to expect so we have enough chairs and secret sauce.
Please add your name: http://www.doodle.com/bg5x7xrbcg5z9h8q
Feel free to invite your friends.

[0] Keep an eye on http://0x20.be/ for the latest agenda updates,
and maybe follow the bird on http://twitter.com/HSGhent
[1] http://wiki.openwrt.org/oldwiki/tableofhardware


ubuntu-be mailing list / mailto:ubuntu-be@lists.ubuntu.com

It’s there:

Grotere kaart weergeven