pulsar's blog

Unzip *A LOT* of Files Into Directories Named After the Archive Itself?

  1. #!/bin/bash
  2. pattern=*.zip
  3. for i in `find -name $pattern`; do
  4. dir=${i%\.*}
  5. unzip -o $i -d $dir
  6. done

I had to, ~5k archives. Using the context-menu and 7zip "extract to.." would stop processing the zip files after... maybe the 200th archive - without any error messages.

The Cake Was Not a Lie!

THE CakeTHE Cake In fact, it was VERY delicious. And it was ALL MINE! Well, my ex-fiance got some too.

Why I Love Local Initializers...

  1. layoutTable.Rows.Add
  2. (
  3. ControlUtils.CreateRow
  4. (
  5. EmployeeFieldLabels.ExternalCompanyName,
  6. new ExtCompanyPickerControl(CreateChildID("ExternalCompanyName"))
  7. {
  8. Customizer = new ExtCompanyCustomizer(MedaSession),
  9. AllowMultipleSelection = false,
  10. RenderListHeader = false,
  11. CountryProviderId = locationPickerControl.ID,
  12. CountryProviderProperty = "SelectedCountryIsoCode";
  13. },
  14. false,
  15. EmployeeFieldTooltips.ExternalCompanyName,
  16. Page,
  17. CreateChildID("ExternalCompanyLabel"),
  18. (
  19. externalCompanyValidator = new CompareValidator
  20. {
  21. ControlToValidate = CreateChildID("ExternalCompanyName"),
  22. Operator = ValidationCompareOperator.Equal,
  23. Type = ValidationDataType.Integer,
  24. ValueToCompare = "1",
  25. EnableClientScript = false,
  26. Display = ValidatorDisplay.Dynamic,
  27. ErrorMessage = string.Format(EmployeeManagerControlRes.ErrorValueRequired, EmployeeFieldLabels.ExternalCompanyName)
  28. }
  29. )
  30. )
  31. );

Check them out! http://msdn.microsoft.com/en-us/library/bb384062.aspx

Encoding Flash Videos

So I don't need to look up the command line parameters ever again:

ffmpeg -i SOME_MOVIE_INPUT.[mkv|avi|mov|whatever] -ar 22050 -ab 65536 -vb 819200 -f flv out.flv

You can grab a copy of ffmpeg for Windows over here, OS X guys should have a look at ffmpegX (didn't try this myself yet) and Linux users will know better what to do.



Things change, command line arguments too. So, here is the updated version:

ffmpeg.exe -i c:\temp\in.avs -ar 44100 -ab 65536 -s 704x400 -b 2097152 -f flv c:\temp\out.flv

-ab stands for audio bitrate
-b for video bitrate
-ar audio-rate
-s for proximity window of the next solar flare

Adaptive Framerates Or How Software Video Players Can Maximize The User Experience

Here is an article I originally wrote for the boxee forum:

I would like to address a feature commonly ignored by all media players I have come across so far. Let's talk about adaptive speed. Regardless if you are living in the USA (NTSC) or Europe (PAL) - you will suffer from video jittering sooner or later. (more after the link)

Let me describe the issue here a bit closer.

Imagine a landscape being filmed while the camera pans slowly from the left side to the right side. If you are watching this scene on a DVD using a standalone DVD Player everything should be smooth and without any jittering. Now if you use this DVD and try to playback that one using a PC you will notice the playback not to be that smooth anymore. So, what is happening here?

Once the DVD Player has determined the frame rate of the source video material it will also set the video output refresh rate to match that speed. For instance, If we are dealing with NTSC material which would be at ~30fps the TV will be advised to use ~60Hz. Each frame in the video source will be displayed on 2 frames rendered on your screen. So, everything is fine and in sync here.

Now, if you head over to your PC and configure your monitor to use the refresh rate of 75 Hz for instance, that very same video would map one frame in the video material to 2.5 Frames on the screen. Depending on the player software used you will notice one of the following artifacts:

Environment Editor

Usually I don't go that crazy about small cool freeware tools. But the existance of this one is rather ironic and shows how absurd the development of windows is in some regards.Let's have a look how the Environment-Editor in Windows Vista looks like: Vista's Environement EditorVista's Environement Editor It seems they (Microsoft) have not updated this particular dialog since 1995 when Win95 was released. So now we have that fancy Vista with all new UI meant to be more user friendly and yet have to deal with barely usable dialogs for system settings not changed a bit for over than 13 years. This is what I call improvement, way go to guys! So, check out this tool - it might come handy if you need to edit your environment variables without going nuts:Rapid Environment EditorRapid Environment EditorMore information and download over here...

Java 6 Update 10 Available

Wow! The first official (Sun) Java Look & Feel I do actualy like! Sweeeeeet!

Nimbus Look&FeelNimbus Look&Feel

I'll spare you with all the buzz about the modularity, small dowload sizes etc. Go and read it on your favorite Java tech blog. Did I mention that I do really like the new default Skin ... err ... L&F?

More details over at sun.com

SQLite, nHibernate and .NET

Misusing this blog as my personal Post-It: http://www.mikeduncan.com/sqlite-on-dotnet-in-3-mins/

Ubuntu, eee PC 901, Compiz and Canola

And just a little bit more toying with the eee pc today. I contacted the guys over at INDT and asked about if they are going to support the x86 platform for Canola which was available for the Maemo (Nokia N700 and N800 Series) plaform only so far. It turns out they have already builds for the Ubuntu distribution available and managed to convince the the managers to release the sourcecode under some open source license pretty soon. Awesome news! Take a look:

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

The screen capture was done using recordMyDesktop and converted to flv using mencoder


A few days ago I got my second Asus eee PC - the 901. Having both of them (701 and 901) I decided to exchange some components among them.

eeePC 701 BoardeeePC 701 BoardFirst victim was the wireless PCI-Express adapter. The chipset used in the 701 works way better for linux and - most imporant - for me. This would be a Atheros AR242x chip compared to some Ralink not working properly with ubuntu. The smart guys over at Asus decided to bury the card way too deep in the casing, so one would have to disassemble the whole hardware to get to the card. In contrast to that, the 901 was a piece of cake (the cake is not a lie! Dammit!). The card was accessible quite convenient right behind the back plating which is meant to be removed. Now we can have some fun with ... umm ..."unconventional" packets, yay!

eeePC 701 and 901eeePC 701 and 901I've also decided to swap the previously installed 2gb ram module in the 701 with the 1gb shiped with the 901. A router does not necessary need that amount of memory while my desktop does. Just before I finished assembling both netbooks I noticed that the keyboards used in both of them were pretty much identical. So I decided to add some contrast to my white 901. Not sure If I'll stick to it, but right now I like it. Maybe I should get some spray paint too...

IMHO, the whole netbook hype has a strong Amiga flair to it. Back then it was very common to modify your hardware to your needs: installing ram, Harddisk adapters, Chipset-Mods (can you spell Fat Agnus?), and even exchanging the CPU and overclocking it to get some more juice. The eee PCs are very friendly regarding this aspect. Built pretty robust, easy to open and a lot of options to exploit. The only difference is, now it is cheaper to do that. Adding some hardware to your Amiga back then was quite expensive - no we can use standard notebook and usb components to pimp the hardware. /me likes!

Oh, sorry for the crappy Images. I really need to get my cam back which my brother borrowed.

Imprint Datenschutzerklärung