Få loss fastrostad sadelstolpe

Fastrostad sadelstolpe

På mitt senaste Renoveringsprojekt hade sadelstolpen rostat fast. Så innihelskotta fast. Jag började på HappyMTB och Sheldon Brown och slutade med följande:

  • Spruta på mycket WD40 – låt stå nån dag
  • Skruva loss skruven som håller stolpen helt
  • Böja ut öronen lite
  • Vrida på sadeln. Not so much lossna.
  • Spruta i mer WD40
  • Ta bort sadeln och banka uppifrån på sadelstolpen med en hammare
  • Skruva på sadeln, slit
  • Och vips! är den lös. Och sjukt rostig.

Jag vet inte riktigt hur jag ska få rent i ramen men de är nästa problem 🙂

Återkommer!

WordPress on OSX (10.6.8), Apache, PHP & htaccess

I’ve just managed to get OSX 10.6.8 to work with mod_rewrite and .htaccess to be able to let WordPress rewrite it’s URLs. Here is what I did.

I installed WordPress to my homefolder so I’ll access it using http://localhost/~ola/wordpress. Apache is configured to use a split config in OSX so to change the directives for the home folder you change the file /private/etc/apache2/users/Ola.conf. I changed AllowOverride None to AllowOverride All and restarted Apache.

I got a 403 Permission denied message. I checked the Apache error log /var/log/apache2/error_log. It said: [Mon Nov 28 16:30:47 2011] [error] [client 127.0.0.1] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /Users/Ola/Sites/slipstream/wp-admin/options-permalink.php, referer: http://localhost/~ola/slipstream/wp-admin/options-permalink.php

I added the Options directive FollowSymLinks to /private/etc/apache2/users/Ola.conf, restarted Apache and it worked fine.

I’m only using this config as a development box so I’m not sure if it has any security implications. If you have any knowledge about this just let me know.

Using Motion webcam software to capture an image every 30 seconds

Sometimes I use a webcam to capture images that I then use for time lapse videos. Other times I use my old Canon camera with CHDK and an interalometer script.

I have been trying to find a simple and robust webcam tool for this for years but all packages are too complicated and anoying. I just want to take an image every 30 seconds and be done with it. No HTTP server. No fancy scheduling. Nothing more than getting my images from the camera.

In Windows I have tried webcamXP and that’s pretty good. In Linux I have been running Motion. It’s a full featured motion detection package. Capable of much more than I want.

I adjusted the config file for Motion to only save one image every 30 seconds. Just as I want it.

My Motion config file (~/.motion/motion.conf)

# Motion is a webcam software that is designed for doing motion detection.
# I made the most simple config I could to disabled all motion detection
# features. Instead I just use it to take one picuture every 30 seconds.
# It's configured for giving the hightest quality possible with a
#   046d:0992 Logitech, Inc. QuickCam Communicate Deluxe
#
# Visit the web site for more information about Motion
#   http://www.lavrsen.dk/foswiki/bin/view/Main/WebHome

snapshot_interval 30
width 1280
height 960
quality 95
text_right ""
target_dir /home/ola/webcam/capture
snapshot_filename %Y-%m-%d/%Y%m%d-%H%M%S

process_id_file /var/run/motion/motion.pid
output_normal off
v4l2_palette 1
framerate 2

Multiple user profiles for Google Chrome

Recently I wanted to set up multiple profiles in Google Chrome. One for my personal browsing and one for my work. This way I don’t need to sign in and out from my different google, twitter, flickr and facebook accounts.

There is no GUI for this and it involves running some command line but it’s not too hard.

You should run all commands on one line and make sure to change the paths to your user name and profile.

Windows 7 / Vista

First you make a copy of your current default profile. You can do it either in Windows Explorer on on the command line.

xcopy "C:UsersOlaAppDataLocalGoogleChromeUser DataDefault" "C:UsersOlaAppDataLocalGoogleChromeUser DataOla" /e /i /h

Then you reset your new profile

C:UsersOlaAppDataLocalGoogleChromeApplicationchrome.exe --user-data-dir="C:UsersOlaAppDataLocalGoogleChromeUser DataOla" -first-run

Then you create a new shortcut on your desktop to launch your new profile

C:UsersOlaAppDataLocalGoogleChromeApplicationchrome.exe --user-data-dir="C:UsersOlaAppDataLocalGoogleChromeUser DataOla"

Ubuntu 10.10 (Linux)

Copy default profile

cp -r /home/ola/.config/google-chrome/Default/ /home/ola/.config/google-chrome/Ola

Reset your new profile

/opt/google/chrome/google-chrome --user-data-dir="/home/ola/.config/google-chrome/Ola" -first-run

And add a new Launcher (shortcut)

/opt/google/chrome/google-chrome --user-data-dir="/home/ola/.config/google-chrome/Ola" -first-run

That’s all there is to it.

 

Making screencasts for Youtube with CamStudio

Yesterday I needed to find a simple and robust solutions for recording a screencast. It turned out to be not as easy as I thought.

To get a similar workflow as with my other video editing I wanted it to work like this:

  1. Record a 1280 x 720 section from my screen to a high quality format
  2. Open and edit the recorded file in Sony Vegas Platinum 8
  3. Render it from Vegas to a lossless format
  4. Re-render it using HandBrake
  5. Upload the file to Youtube

Record with CamStudio

I started out with the latest beta of CamStudio. It a nice, simple and easy tool that does what I need.

My first attempt was to save an AVI file with the included Microsoft Video 1 codec. The quality was pretty low so I tried to use the CamStudioCodec (from their web site). I got a nice looking AVI. However Vegas didn’t really like this file. It worked, but it was very slow.

Then I tried to use the Huffyuv codec that I had installed recently when I optimized my HDV workflow. It created a BEAUTIFUL HUGE file that I could work with in Vegas. I edited the file, normalized the audio and rendered the video almost exactly the same way as I render all my other videos (described in my HDV workflow). I just lowered the resolution from 1440 x 1080 to 1280 x 720.

Re-render and upload to Youtube

I opened the file in HandBrake and selected the High Profile. I exported the file the same way as in my normal HDV workflow. It created a good looking file. I uploaded it to Youtube. Everything went smooth. Until I looked at the video on Youtube. It came out gray. No video at all. I made a test upload to Vimeo. No problems. I tried with different codecs and settings. Both in Handbrake, Vegas and CamStudio. All came out gray on Youtube.

I tried really hard to understand why this didn’t work but I couldn’t get it to work so I resorted to Avidemux. I opened the file in Avidemux. Selected the MPEG-4 ASP (Xvid) codec for video and MP3 for audio (I increased the quality on both). I exported the file and boom. It worked fine on Youtube.

I’m not sure what went wrong. Or why. And I ended up yet another tool in my belt. But I almost reached my goal of having similar workflows so I’m pleased.