Location based reminders

Just realized the usefulness of location based reminders that’s going to be released with the launch of new iOS 5, and that i felt the need to write something about it.

Well, for me, I often forgot something what interests me on certain places. Or even if someone asks me to grab something for them if I visit a place, town or province the next time. This app, if it works, should alert me of what stuff I need to grab while I’m at some place. This is one the reasons I am excited with the launch of iOS 5.

I wonder though, if it’s ever going to be of a purpose to remind “when you leave from a location”, as it would be triggered when you already left, or yes, it may serve some – for you to go back. If I remember correctly, there are triggers for that and “when you arrive at a location”. Or is there another one for “when you’re at a location”? But generally, it has a purpose.

They’re just my thoughts.

On an unrelated note, it’s quite a pain writing on wordpress for iphone, really! I actually updated this app just an hour ago. The cursor always returns back to the end of the content if you position to edit on other parts of the text. Neither it loads auto complete on words. And pressing space twice should add a period, but it doesn’t do that. Why?

Anyways.

The Best Picasa for iPhone so far

Finally, I found an app for Picasa on iPhone that saves the entire EXIF data on upload. And has the tabs for showing the map from your iPhone as well. Here’s the excerpt from the publisher.

Piconhand – Picasa Web Albums On Your Hand for iPhone

Enjoy your Picasa web albums and photos on your hand!

Multiple accounts
You can see the albums of multiple accounts in one list

Batch upload
You can add multiple photos in the upload queue and also can preview. The time and geo info (if available) of photos is also included while uploading.

Slide show
You can set the songs in your iPod library as the background music of the slide show. And also can set the transition effect and time as you want.

Passcode lock
You can lock the app with password to protect your privacy.

Features
Multiple Picasa accounts
Create and delete albums
Share album links via email
Create and delete photos
Batch upload
Slide show
Passcode lock
Tag editing and browsing
EXIF available
Send photos via email or save photos in your library
Favorite photos
Sort option for album & photo list (can be set in separate by album)
Search photos in cache
Quality set for photos to be dowloaded/uploaded
Account filter for albums
High-res options for iPhone4/iPod 4th gen
Map view based on photo’s geotag
Album and photo property editing

Video stream from your iPhone

Here’s how you can do video streaming without pain on iPhone.

What you need are:

  • iPhone 4 (not tested on 3G or 3Gs but probably will work)
  • Justin.tv Account
  • WiFi network with Internet

And here’s what you do

  1. Download and install Justin.TV for iPhone
  2. Run it and login with your account (gear icon on the upper right of Justin.TV on your iPhone)
  3. Click the camera icon on the upper left, then press ‘record’ button

That’s it! You can view your stream on your Justin.TV badger page – http://www.justin.tv/username

You do not only stream videos actually, they’re recorded. Your channel will list the previous streams right below your current stream. Here’s a link of the first stream I did, or the recorded stream.

And there’s also a Justin.TV for Android of course!

Ruby on Rails on Ubuntu 10.04 Lucid Lynx

Just need to keep this for reference. Quite important when playing around with RoR. Thanks to the source

marvin@marvinmarcelo:~$ su
marvin@marvinmarcelo:~$ apt-get install build-essential
marvin@marvinmarcelo:~$ apt-get install ruby rdoc libopenssl-ruby
marvin@marvinmarcelo:~$ wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
marvin@marvinmarcelo:~$ tar zxvf rubygems-1.3.7.tgz
marvin@marvinmarcelo:~$ cd rubygems-1.3.7
marvin@marvinmarcelo:~$ ruby setup.rb
marvin@marvinmarcelo:~$ ln -s /usr/bin/gem1.8 /usr/local/bin/gem
marvin@marvinmarcelo:~$ gem install rails

Playing around with jQuery – prefill search input field with description

It’s been long since I made changes to my wordpress blog site, this is what happens when you have free time as a programmer.

So, I just realized the submit button on the search form on the header is not really important, I hid it now by simply display: hidden;. Then, some text might help to indicate that that form above is used for search.

Here’s the code

1
2
3
4
5
6
7
var changed = false;
$('#searchform #s')
  .addClass('quiet').val('Search...')
  .bind('change', function(){ if ( !changed ) { changed = true; } } )
  .bind('focus', function(){ $(this).removeClass('quiet'); if ( !changed ) { $(this).val(''); }  } )
  .bind('blur', function(){ if ( !changed ) { $(this).val('Search...'); $(this).addClass('quiet'); } } 
);

In wordpress, the search input field name is ‘s’, in case you find this helpful and want to use it, just replace the #searchform #s with your own selector. I might make this a plugin someday.

Converting video for iPod / iPhone mp4 in Ubuntu

First, you need to follow installing these packages on your ubuntu machine. Mine was installed on Hardy, haven’t tested the command yet now that I have upgraded to Lucid.

ffmpeg -i "Output_Video_File.flv" -vcodec libx264 -b 512k -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -me_method hex -subq 7 -trellis 1 -refs 5 -bf 0 -flags2 +mixed_refs -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4 "Output_Video_File.mp4"

This also works on .avi and .mpg as the source video.

Update: Howto link for Lucid

Not matching charset reloads page twice

I noticed this when I uploaded an entire project files from dev server to production server. Using Web Developer plugin for Firefox, I had a clue to compare the Content-Type from the response header and the one I have in <meta> tags in my HTML.

1
2
3
4
5
6
7
8
9
10
11
12
Date: Wed, 25 Nov 2009 01:32:28 GMT
Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch
X-Powered-By: PHP/5.2.4-2ubuntu5.7
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 6572
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
 
200 OK

And it was really it! Though they both have text/html, they had different character set values. Server responses with ISO-8859-1, but the <meta> instructs the browser to use utf-8, as it is declared in the document.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

And so the second load of page occurs, its sort of trying to correct page encoding on the client-side. In the script I was working, I needed to pass some session values to the next page and clear it on page load, but when it reloads the second time, the session value had been emptied.

Hope it helps.