Archive for the 'tip' Category

How to split flash (.flv) file to upload to youtube

Say, you have a huge flv flash file you want to upload to youtube.
You’ll find yourself in trouble as there is a limit to the filesize you can upload.
Where you needed to download and install bloatware in Windows to accomplish this,
it’s super easy in Linux.

ffmpeg will do the trick.
Say you want to cut the flash movie in pieces of 10 minutes, you can do this like this:

ffmpeg -i filename.flv -ss "00:00:00" -t "00:10:00" filename_chunk.flv
ffmpeg -i filename.flv -ss "00:10:00" -t "00:20:00" filename_chunk2.flv
ffmpeg -i filename.flv -ss "00:20:00" -t "00:30:00" filename_chunk3.flv
...

Now you’re ready to upload your video’s.

Ubuntu 10.10 and ATI Radeon HD 6870

So, quite some time ago I made the mistake of buying the ATI Radeon HD 6870 without first checking if it would play nice with my Ubuntu 10.10 desktop.
Turned out it didn’t :(

But now, there are proprietary Linux drivers released by ATI/AMD

  1. First, you should update your system (just to be sure).

    sudo apt-get update
    sudo apt-get upgrade

  2. If you’ve been using older drivers, remove them.

    sudo apt-get remove –purge xserver-xorg-video-radeon

  3. Download the install package from the AMD suppot pages and make it executable

    chmod +x ati-driver-installer*.run

  4. Run the installer as sudo-user

    sudo ./ati-driver-installer*.run

  5. Reboot

Enjoy!

The Linux 2.6.38 kernel carries the ATI Radeon HD 6000 open source support. (just fyi!)
If you encounter problems or found this post helpful, it would be nice to leave a comment below.
This way, I can adjust it to the needs of my readers.

Nasty little OpenSSH Bug

So I’ve been using my Targa NT9231 as a home sever (Running Ubuntu 10.10 server edition) for a while now.
It’s been serving several purposes such as internal webserver, irssi, monitoring and tunneling/proxy server.

As all wise people should do, I’ve been using OpenSSH to connect to it.
Solely  connected to it from my netbook, as my desktop Ubuntu computer died after the purchase of a new ATI (curse you) Graphics card.
But now, I managed to revive my desktop (yay!) and wanted to log in on my server.
Setted up the key and wanted to transfer it to my authorized hosts file… but that gave me a bloody error:

Permission denied (publickey).

So I started to digg around and checked filepermissions, ssh_config file etc… But all seemed ok.
But then I found this little nasty openSSH Bug on launchpad.

Simply running “ssh-add” on the client fixed the problem!

Ssh-add adds identities to the authentication agent, ssh-agent. When run without arguments, it adds the file %HOME%/.ssh/identity. Alternative file names can be given on the command line. If any file requires a passphrase, ssh-add asks for the passphrase from the user.

I’m not sure how this could’ve helped, but hey, its a workaround that actually works :)

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!

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>

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://0×20.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://0×20.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://0×20.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