Welcome!

19 11 2008

This place is undergoing heavy construction, so expect the unexpected!  Treats or trouble, you never know what will be afoot!

Please visit my blog and other sites as intended by visiting:

www.Hilarity-Ensues.net





Recursive Batch Image Resizing in Linux

24 01 2009

So today I needed to resize a photo archive of 3000 images spread out in sub-folders for every year and month… Fortunately, in linux with a bit of research I got it!

First off, you must download ImageMagick – if you are running Ubuntu, LinuxMint or a similar distro with APT you can simply do:

sudo apt-get install imagemagick

Then you can cd (change directory) to the folder containing the pictures that are to be resized. For example:

cd /home/username/Pictures/toShrink

Now for example, if you only need to resize the .jpgs in this folder to 800px wide do:

mogrify -resize 800 *.jpg

NOTE: This is case sensitive, .jpg is not .JPG.  It is likely that you will have to run any of these commands for all file extention variations in your collection.  For instance once with *.jpg, then *.JPG, then *.jpeg then *.JPEG

To resize them to a specific size (distorting their aspect ratio if necessary) do:

mogrify -resize 800x600! *.jpg

To resize them to 50% of their original size do:

mogrify -resize 50% *.jpg

To resize them to a specific pixel content (effectively scaling small images up and large images down to a uniform size while maintaining aspect ratio) of their original size do:

mogrify -resize 480000@ *.jpg

Basically, the above number is 800*600=480000px.  Whether it be 800×600 or 600×800 or even 1200×400 pixels in size the image contains a total of 480000 pixels.  This will scale the images so that they contain X number of pixels.

Since many of my photos were different aspect ratios, different sizes and different orientations, some even panoramas, I settled for the above option.  I used 2000000@ which made all of my 4:3 photographs 1632×1224 and the panoramas similarly sized – not totaly precise but at least now all the pictures taken by different cameras at different resolutions are all roughly the same size!

Now RECURSIVE BATCH IMAGE RESIZING:
To resize all .jpgs in this folder and every sub folder contained within it (recursively) – FIRST DO A TEST RUN! – the following command will NOT change files, it will just output to console the commands that it would be performing:

find ./ -name "*.jpg" -exec echo mogrify -resize 800 {} \;

You should see outputted to console the mogrify command for ONLY the files that you want to resize.

mogrify -resize 800 ./subFolderName/fileName.jpg 

This is an example output that I get:

mogrify -resize 800 ./2007/12_December/IMG_0172.jpg
mogrify -resize 800 ./2007/12_December/IMG_0199.jpg
mogrify -resize 800 ./2007/12_December/IMG_0166.jpg
mogrify -resize 800 ./2007/04_April/2007-04-25_ph101_12.jpg
mogrify -resize 800 ./2007/04_April/041207_13491.jpg
mogrify -resize 800 ./2007/04_April/2007-04-25_ph101_13.jpg

Make sure that the options are correct and that it is modifying the correct files.  Use caution, test it out on a few images first..  This overwrites the original file so make sure that you have a backup of everything just in case something goes wrong.
If it all looks good and you’re ready to go, simply remove the echo .
This is the final command that I used (resizing 4:3 images to around 1632×1224):

find ./ -name "*.jpg" -exec mogrify -resize 2000000@ {} \;

Remember, it is case sensitive.  Run it again for *.JPG , *.jpeg, and *.JPEG!

ImageMagick can do a whole lot more, things such as image conversions.. like JPG to PNG :)

convert *.jpg imageSeriesName.png

Check out the ImageMagick site to learn more about what you can do with this extremely powerful non-graphical graphics program! :D

Good luck guys, hope this post helps make life easier for a fellow creature of the net!





Tweak Dial up with Proxy Caching – QUESTIONS!? + answers!

10 01 2009

Okay so I’m going crazy trying to come up with an ideal tweaked setup for my mom’s new laptop.  I must get it perfect before I send it out to the middle of nowhere 24kbps dialup country.

Using a localhost DNS server probably does improve performance, but i’m not sure about a proxy.

These are my questions in response to THIS Tweak guide:

I’ve been attempting to do proxy caching technique using Squid, but I really am wondering exactly how it functions and I have some doubts as to whether or not it really works.

So from my understanding this is how it all works:

  1. User clicks link on a webpage:
  2. Client contacts DNS server (ideally localhost, if DNS entry isn’t there it pulls it slowly from the net ISP or OpenDNS server)
  3. Client browser requests webpage from browser cache, if not found, it asks for it from localhost proxy cache, if it’s not there it pulls it slowly from the net.
  4. Files are slowly downloaded and written to proxy cache, then written to browser cache creating an unfortunate redundant data and drive usage? :(
  5. Webpage is rendered in browser.

Next time user goes to that page, ideally the content is cached locally and it will load quickly from the harddrive.

Now my major question is -
I can see how a localhost proxy cache would be useful if you had multiple people logging into the same machine where their browsers have seperate caches – but is there any benefit to proxy cache in a single user setting?

Well, I’ve concluded that proxy cache is the way to go, despite it’s added difficulty for two reasons:
1. Mozilla Firefox has the TERRIBLE habit of ERASING the entire disk cache every time it crashes or closes improperly…This renders making a huge disk cache in firefox pointless since it will likely be lost.
2. The proxy cache provides much more in terms of configuration options and works for multiple users and multiple applications.

Does the browser cache and the proxy cache function in the same way? Do they save everything?  .JS, .SWF, .PNG, etc… ?  Wouldn’t it be best to then disable the browser cache to avoid redundant disk usage?

Yes, it seems to cache everything, even cookies.  As far as I can tell the browser disk cache can be disabled when using proxy cache.

What happens if a dial up user clicks Stop – does the proxy server continue to load the files for that page – actually causing their internet speed to slow down??

Well, I’ve only dealt with Polipo caching proxy and apparently it when the user clicks Stop, Polipo stops loading the file but caches the partially downloaded file so that it continue downloading it later in case the user requests it.  However, I think I read that many other proxies do not cache incomplete files…

Haha sorry for the rant but if anyone knows the answer to any of these questions.. please please post :)   Thanks!





Fall 2008 Semester: The grades are in!

3 01 2009

Woot, the grades turned out better than I expected. 19.5 credit hours of doom, complete.   Now to just figure out what I can do about the INCOMPLETE for Color and Light..

CRN Subject Course Course Title Final Grade GPA Hours Quality Points
21214 CG 314 PROGRAMMING CONCEPTS A-

2.000

7.40

21215 CG 321 DSGN & AUTH INT MEDIA II A-

2.000

7.40

21216 CG 341 3D MODELING AND ANIMATION A-

2.000

7.40

21220 CG 344 HISTORY OF ANIMATION A

3.000

12.00

23025 CG 346 PRINCIPLES OF ANIMATION I B-

1.500

4.05

21709 CG 351 STORYBOARDING & STORYTELLING B+

2.000

6.60

21223 IL 302 DRAWING FOR ANIMATION I A-

2.000

7.40

2157 PE 141 FITNESS TRAINING A

1.000

4.00

23035 SC 032 COLOR SCIENCE LABORATORY A

1.000

4.00

23710 SC 332 COLOR AND LIGHT B

3.000

3.00





Winter Vacation, To-Do List Placation

31 12 2008

Well, the madness of the end of semester is over.  An uneventful (which is good) Christmas has passed – all I did was sit back and watch Slumdog Millionaire, which is a surprisingly awesome movie.

It feels as if I’m making no progress at chipping away at the long to-do list of things I wanted to catch up on during this vacation..  I’m suspecting that to-do lists really do not work.  It seems like, despite the fact I’m barely working two days a week right now during break, I still am falling behind.  There’s so much to do on my list and yet, bam, suddenly tons of bills come, birthdays, holidays, other responsibilities, etc.. The original ToDo list just sits there and pretty much now there’s a NEW ToDo list of more urgent tasks.

I need to somehow pay for tutition which means generating $1k in two days which doesn’t seem possible – this would not have been a problem if my winnings from QuakeCon 2008 QuakeLive had been what they were supposed to be.. They told me that I won $2000, but the check that arrived in the mail was $1000..it’s hard to complain since it’s prize money but still I was really counting on that money for school.  Oh well, guess it’ll be a high interest payment plan for this semester.

I need to learn Adobe AfterEffects well enough to start a level 2 course even though I’ve never taken level 1.. I suspect that during my sleep deprived final two weeks of classes I managed to totally forget to go to my Science of Color and Light final and so I recieved an INCOMPLETE.. Ugh, so disappointing, don’t know how..I thought I went.. I did.. didn’t I?  I don’t remember anything really from the last weeks of school.  It’s kinda frightening.  Next semester I need to make sure that I sleep no matter what happens.

Anyway, so the good thing is I’ve recovered my home built desktop computer from it’s neglected, virus riden state.  What really did it under was a virus that I aquired during an epic two day attempt  at installing the patch for  Resident Evil 4 / Biohazard.  This is a patch that is necessary since the PC port of the game was a total hack job and should never have been released without more work.  I failed miserably in the end at patching the game (trust me, building a computer and setting it up as a headless linux server is easier than patching this game).  And well.. the good news is, now the computer is all fixed up again as a dual-boot machine with a minimal install of WindowsXP sp3 (just for games) and LinuxMint 6 (for everything else).  It’s still not tweaked as nicely as my old Ubuntu Studio setup, but it does the job for now and I found this FlickR group of 360 degree photos to use for the fully rotatable skybox.

Well.. time to enjoy some gaming at long last.. Enemy Territory Quake Wars and HalfLife: Episode One (FINALLY!)





Super Size My Monopoly Money

14 12 2008

The following is an excerpt from my essay on Super Size Me, for fitness class:

American public schools provide American children with terrible food that is basically the same as fast-food. This is because large food corporations have payed lobbyists working for them in the government and probably even the educational system. These lobbyists help ensure their patron’s wishes, such as the position as primary food provider for a school district, etc. This allows their corporations to sell low quality food to our children at high prices with government educational funding taken from our tax dollars. Various huge companies have a monopoly on the industry, such as Aramark – the company that produced horrible lunches at my high school way out in New Mexico and continues to produce horrible lunches at my college all the way in New York – there is no escape! I spent a brief period here at FIT working with the Foreign Films Club (now shutdown due to bureaucracy) and was really frustrated by the fact we were forced to pay Aramark for food during our movie showings. We were forced to spend over $12 per person for crappy Aramark boxed lunches, while we could have purchased high quality natural food from a small local restaurant for significantly less.

The terrifying thing is that this sort of corporate bureaucracy exists all the way up in all aspects of today’s global society. Not only are we forced to eat unhealthy food, but little by little human beings are losing more and more of their personal freedoms. We accept that we are in a rush running to school or work and can only spend a few dollars on an unhealthy McDonald’s cheeseburger. We don’t bother trying to customize our sandwich just like we don’t try to order customized shoes from Wal-Mart or a customized car from Ford. We accept it as it comes because we know we cannot change it. Fast-food is assembly-line cuisine and we live in an assembly-line society. With every generation a little less personal freedom becomes the accepted norm, and the eventual outcome is scary. We live in a world where the machine of humanity is so large that the individual gears are of little significance, as long as we spin and spend our money the machine can and will continue to give us the little dirty drop of oil that we need to survive. And when we get sick from it’s impurities we go to the doctor and make the medical and pharmaceutical industry gears spin – in sickness and in health we will make the machine run, even if it kills us. The end.





PSP to PC with RemoteJoy Lite

12 12 2008

So my final animatic is due tomorrow at 9am for storyboarding class and as per usual, I ended up procrastinating till past midnight.  Tonights form of procrastination was an attempt to capture video and audio from my PSP (fat) to my PC (at school – AMD 64bit).

Requirements: (google them) are:

  • A PSP running custom firmware ( i.e. 5.00 M33-4 )
  • RemoteJoy Lite v0.19
  • RemoteJoySDL 2007 (if you’re using 64bit)

RemoteJoyLite Installation Instructions
(THIS IS ASSUMING YOU ARE RUNNING CUSTOM FIRMWARE)

  • Extract both archives.
  • Copy the remotejoylite.prx from the RemoteJoyLite package into a folder called seplugins/ in the root of your memory stick.
  • Completely reboot your PSP, hold R-trigger to access recovery menu.  Under Plugins, enable the remotejoylite.prx plugins. Exit to XMB.
  • Connect the USB cable, the PC should recognise a new PSP Type B device.  In the install wizard browse for the appropriate libusb0.dll – I believe you can find the driver in the RemoteJoyLite package, but if you’re using a 64bit PC like I am, you’ll need to install the 64bit libusb0.dll from the RemoteJoy SDL package.
  • Then you can simply run RemoteJoyLite_en.exe! Double click it for fullscreen :)

Game compatibility seems to be sketchy, here’s my list so far:

  • Starwars Battlefront Renegade Squadron – WORKS PERFECTLY!
  • Monster Hunter Freedom 2 - WORKS PERFECTLY!
  • Prince of Persia – Rival Swords – Doesn’t work!
  • Syphon Filter – Logan’s Shadow – Works Partially (Glitchy sound or textures)
  • PSone games – Don’t seem to work..

Here’s an experimental screencapture I did of Syphon Filter – Logans Shadow (Episode 3 part 3 – Nowhere to Run) (hard difficulty)
You’ll notice the odd glitchy sound that occurs when running RemoteJoy with this game.. too bad, it would look great on a big screen :(






Tilt Shift Photography

10 12 2008

I just came across some cool examples of tilt shift photography, which is something I never really knew about before. This is an intriguing effect in which full size scenes are given a miniature appearance.  It would be really cool if this sort of effect could be integrated into an animation, video game, etc.. Note to self: research tilt shift photography!

(mostly this post is just to move the “Smarty Pance – Epistemology boxer” image down so I don’t have to look at it any more)





Pocrastination! Smarty Pance – Epistemology Boxers

3 12 2008

So, I was attempting to do my Flash portfolio and website projects that are due TOMORROW morning and got distracted… My friend got me looking at Benford’s law on wikipedia and then Don mentions “epistemology” – the theory of knowledge, which I proceed to look up.. and then I somehow become convinced that it is absolutely imperative that the  bubble chart from epistemology’s wikipedia be on a pair of boxers… and after 40 minutes of searching google image search for “underwear”, “monkey wearing underwear”, “panties”, “butt”, “ass”, and “boxer brief” I found this image and the photoshopping ensued!

Pocrastination of Po

Pocrastination of Po

Alright, now that this shameful moment of my life has passed, it’s time to get back to work!





Zenwalk Linux 5.2 XFCE on a Dell Dimension L866r

19 11 2008

Well to get things started here on wordpress I might as well post these notes that I wrote that cover the key points necessary to install Zenwalk Linux on a Dell Dimension L866r (PIII-866, 382mb PC133).  I wish I had these notes when I was attempting this setup, as it would have saved me many hours of trolling through the web and a frustrating amount of trial and error..

I worked on this system for a Windows-user friend of mine and, after wiping their virii infected Windows ME install, my primary objective was to find the most user-friendly, fastest distro with the best Flash player performance.  This isn’t an easy feat due to the sorry state of Adobe’s one-man Flash for linux project – he’s doing a great job, but seriously, Adobe should get their priorities straight, especially with the increasing low-end linux based netbooks that are flooding the market.  So anyway, I tried several distros of linux on this system and found Zenwalk using XFCE desktop manager to be without a doubt the best, speediest, user-friendly desktop linux – with the smoothest full-screen Flash video playback.

Here’s my cheatsheet:

Dell Dimension L866r w/Dreamwalk Linux 5.2 xfce

  1. Install Zenwalk
  2. > netpkg upgrade
  3. Download Win98 drivers for Wireless RTL8185 (LINK)
  4. Install Windows Driver using Ndiswrapper (LINK): > Ndiswrapper -i driverfilenamehere.inf
  5. Make sure driver shows up: > Ndiswrapper -l
  6. > Ndiswrapper -m
  7. > Depmod -a
  8. > Modprobe ndiswrapper
  9. Wireless Settings: DHCP, Wep hex ##########

I ran into an annoying issue where the desktop would show up at the correct resolution but when you booted and hit the GDM login screen the resolution was too high and the screen would pan around when you moved the mouse to the screen edge..  The desired resolution was 1024×768.  The solution was:

To fix XFCE GDM login screen panning:
Edit /etc/Xorg.conf ; modes:
Delete 1280×1024 (or every resolution that is higher than your desired resolution)

Then there was an annoying bug that caused XFCE to restart every time the xterm terminal was launched…

To stop xterm terminal from restarting XFCE (intel video issue):
XFCE desktop settings; disable compositor

Note that the following section might nolonger be necessary…this was necessary using the Flash player 10 beta and they probably fixed it by now.  Of course, just in case you run into this problem:

To improve flash player performance by installing Flash player 10 – to make it work it’s necessary to:
> ln -s libcurl.so.4 libcurl.so.3
Personal preference:  Install gphoto to replace gkview

canon sd1000 works!

NOTE FOR PUPPY LINUX:
To get rtl8185 wireless working:
http://www.murga-linux.com/puppy/viewtopic.php?p=144470#144470

And that’s it, hope this information can help someone out!  Zenwalk Linux ran beautifully without any problems after this setup.  Amazingly the wireless worked far better in zenwalk than it did in Windows!  My friend recently got a new Dell P4 3ghz system and actually missed her old Zenwalk 866mhz computer.  I guess Windows XP immediately began giving her troubles haha..

Well, I fixed that computer up too..  But that story I’ll post next time :)