Jun 30

On the heels of the Firefox 3.5 release that brings HTML5 video embedding support the following pattern of embedding video files emerges (including on mozilla.com and openvideoalliance.org) that is two distinct sources for the video , one encoded with ogg , one with mpeg4 , using html code as follows :

<video>
<source src=”thefile.m4v” type=”video/mp4″>
<source src=”thefile.ogg” type=”video/ogg”>
</video>

What this does is show the mp4 file in safari and the ogg file in firefox , and it is all well and dandy except in the cases where a lot of media is involved it is unpractical at least to have 2 formats for every video file .

So let’s chose just one format then ,  because ogg is a open standard and endorsed by the One Video Alliance it is a safe bet  , sites like Dailymotion are already migrating to it .

Ok , how about browsers besides firefox , well safari for example can also support ogg video with a codec plugin namely Xiph Quicktime Component , but a simple test reveals a problem with the mime types , safari will not play the ogg file if  it has type=”video/ogg” in the html tag , works just when embeded ogg files have no type  defined.

At this point i am not certain whether it’s a bug or just a misconfiguration in osx or safari, apparently safari uses system wide mime-type settings that are accessible with System Preferences plugins like RCDefaultApp and MisFox but they do not help this cause a lot.

The point i am trying to make is that if you want to use a single format for embedding video and want it to work in all html5 compatible browsers (with ogg plugins) you best not define the type in the html tag if you want the video to work in safari.

Tagged with:
Jun 19

Here is how carrier free charge tethering looks and is done with Orange Romania

iphone

rename ~/Library/iTunes/iPhone Carrier Support/Orange_ro.ipcc to Orange_ro.zip extract and enter Payload and bundle dirs , open Carrier.plist

plist

edit the apns section like in the screenshot , optionally edit the other 2 plists changing BundleVersion from 2.5 to 5.0, save and close all plists

compress the Payload dir an rename the archive to .ipcc , alt+click Restore in itunes and select it after typing

defaults write com.apple.iTunes carrier-testing -bool TRUE

in terminal then just reboot the iphone

mac

i have tested both usb and bluetooth , working great , the ipcc file is atached

Title: Orange_ro
File: Orange_ro.ipcc
Size: 29 kB
Tagged with:
Apr 09
Itunes has a shared library feature but does not show you who and what is it sharing to.So lets start terminal and type :

lsof |grep iTunes |grep TCP

You can also find out what they are listening to by doing

lsof | grep mp3

Now how about for a little fun , say your colleague is listening from a windows machine

nmblookup -A 192.168.0.23

gives you their netbios name , next on use that name with :

echo “Ejoying songname John ?” | smbclient -M THENAMEHERE

shows a dialog like this smack middle in their windows screen
alert
Note that you can send messages like this to any computer you see in finder’s SHARED sidebar , just don’t abuse it , it will stop being funny.
Tagged with:
Mar 17

By default OSX comes with the industry standard apache web server , only OSX server comes with a mysql server however and none are configured my default for php.

Fortunately enabling both php and installing mysql is trivial on OSX compared even to linux
1 – enable php in apache (basically edit the config file uncommenting php module)
HOWTO :
type in terminal

sudo pico /etc/apache2/httpd.conf

press the down arrow untill you see this line

#LoadModule php5_module libexec/apache2/libphp5.so

delete the “#” at the start of the line by pressing right arrow and delete
press ctrl+x
press y
press enter
(you need to use console to edit this file because osx has no way to access that file in a open file window from any program)
2- install mysql
HOWTO:
go and download the package for your architecture and osx version , install it and the pref pane
open System Preferences and click MySQL > Start MySQL Server
open terminal and type :

/usr/local/mysql/bin/mysqladmin -u root password “MYPASS”

/usr/local/mysql/bin/mysqladmin -u root -h MYHOSTNAME password “MYPASS”

change MYPASS to what you want your mysql password to be and MYHOSTNAME to the machine’s hostname (it is shown in terminal along with your user name like this [myuser@myhostname:~])
3 – done , you are the owner of a AMP (apache/mysql/php) server , now you can harness the huge amount of free web software running on this ,
as a test that everything worked fine you can install phpMyAdmin as you will probably need it anyway , go to http://www.phpmyadmin.net and extract it to /Library/WebServer/Documents/phpmyadmin
open /Library/WebServer/Documents/phpmyadmin/config.default.inc.php in a text editor
find

$cfg['Servers'][$i]['host'] = ‘localhost’;

and replace localhost with your hostname

save the file as /Library/WebServer/Documents/phpmyadmin/config.inc.php
done , open http://myhostname/phpmyadmin and login with user: root , password:what you set before
Tagged with:
Feb 16

chromium
Here it is , the first precompiled version of google’s Chrome browser for OSX , whether you want to test your pages in it , or just take a firsthand look of the development so far on the mac version be aware that this is a very early revision and very unstable , for example it just crashes when loading nytimes.com , most websites i visited work fine however.

You can download it from here (or Chromium.app and TestShell.app individually), inside are two apps , Chromium.app and TestShell.app , they are the Release builds of revision 9854 for Leopard (10.5) of Google’s open source code behind Chrome , which is actually called Chromium.

TestShell.app is just the core rendering view , Chromium.app is the whole app so far but websites do not always load in it and rendering can be garbled , just use TestShell to test pages.

I am not affiliated with Google or Apple and i do not take any responsibility nor imply any functionality of these builds i am making available , have fun.

Tagged with:
Nov 01
For every folder you open in Finder it saves a .DS_Store file in that folder with the window settings , here is a easy way to get rid of them (texts in bold are shell commands to be put into Terminal ) the command recursively traverses all the directories , you can replace all the path with / for a system wide cleanup

find /Volumes/myvolume/mydir -name “.DS_Store” -print0 | xargs -0 rm -v

Like all operating systems there are some caches on osx that you might sometimes want to get rid off , to do so :
rm -rfv ~/Library/Caches/
removes all caches for the logged in user
sudo rm -rfv /System/Library/Caches/ /Library/Caches/
removes some system wide caches
sudo rm -rfv /private/var/folders/
removes Leopard specific cache folders
The osx kernel is a modular one meaning extensions are loaded into it as needed , to speed things up especially at boot caches are made that from time to time you might want to clear
sudo rm /System/Library/Extensions.kextcache /System/Library/Extensions.mkext /System/Library/Extensions/Caches/com.apple.kext.info
Tagged with:
Jul 13

Since i started dual booting either Tiger or Leopard one thing that really annoyed me was that i had to deal with 2 itunes libraries , not being able to have the same thing in itunes no matter what i boot into.

Well there is a very elegant and easy fix for that that i am going to detail in this post and it only requires you to have a extra partition besides the ones that you are booting from.
So let’s get to it (texts in bold are shell commands and should be entered via Terminal):
1 – move your itunes library to a partition you do not boot from (i put mine on the Storage partition)
mv ~/music/iTunes /Volumes/IStorage/
2 – boot into each of the os’es and delete ~/music/iTunes if existing and make a symbolic link to the new location in its place
ln -s /Volumes/IStorage/Itunes/ ~/music/iTunes
This works beautifully and it works at some extent for things like Photo Booth too , also tho it might work i do not advise to make the links with Finder , just stick to console.
Tagged with:
May 08
Everyone has those divx movies , you can play them in quicktime given you have the proper codecs like Perian , but the pesky itunes will not add the files to its library.
Well there is a elegant solution for that but you need devtools (found on the install dvd) what we are going to do is basically changing metadata of files.
The bold text below is a shell command that you need to put in Terminal , after you modified the path and extension to suit your needs.
find /path/toyour/movies/directory -name “*.avi” -print0 | xargs -0 /developer/tools/SetFile -t “MooV”
if you want a applescript to do that see http://forums.ilounge.com/showthread.php?t=214705
Now that you can play those files with itunes how about having them show and play in Front Row from the confort of your remote ??!! , without even adding them to the itunes library , it is just a matter of making symbolic links in your ~/Movies folder to the directories containing your movies , you can use the shell or just alt+cmd drag them to ~/Movies to make the links.
Tagged with:
May 08

OSX is nice , and not because it has no shortcomings , but because you can fix them as opposed to windows.This has a lot to do with the power of osx that stems from it having applescript and a posix compliant shell.

Here is how to change metadata of files so you can play divx movies with itunes for example , with terminal and devtools

find /path/toyour/movies/directory -name “*.avi” -print0 | xargs -0 /developer/tools/SetFile -t “MooV”

, with applescript http://forums.ilounge.com/showthread.php?t=214705

Now that you can play those files with itunes how about having them show and play in Front Row from the confort of your remote , without even adding them to the itunes library , it is just a matter of making symbolic links in your ~/Movies folder to the directories containing your movies , you can use the shell or just alt+cmd drag them to ~/Movies to make the links.

Next on let’s take downloading movies from youtube , you have the option of using a shell scripthttp://www.macosxhints.com/article.php?story=20080216181658527 , apple scripthttp://bbs.macscripter.net/viewtopic.php?id=19531 , and finally a full applicationhttp://www.chimoosoft.com/products/tubetv/ that is the best option in this case.

Now how about playing every movie format there is including the flash movies you just downloaded from youtube in anything you like , quicktime , itunes , frontrow etc , well then just download http://perian.org/ and never care about formats of movies ever again.

To top it off i have a script for those times when you do want to know what are your movie files encoded with , this is a extremely fast shell script , with basic info , you can get it packaged as a osx app to drag folders to or directly as a cross-platform script.

vlad_videntify

Title: vlad_videntify.dmg
File: vlad_videntify.dmg.zip
Size: 26 kB
Title: vlad_videntify.sh
File: vlad_videntify.sh.zip
Size: 4 kB
Tagged with:
Mar 06

Ok so i have to quote and comment on the following from informationweek : ^

Jobs’ statements are sure to disappoint Web developers, many of whom are familiar with Flash development

I am a web developer and i am not disappointed at all by his statement which for the record was straight on and amounted to :

“Flash is not yet good enough for the iPhone,”

Now i certainly do not know who advises Jobbs , but i can tell you that a software engineers or web developer will agree with him on that , only the web designers and entrenched corporate entities might differ but that is another story.
And even them benefit from the fact that Jobbs is pushing innovation by forcing adobe to improve the inners of the flash mess and not helping it’s monopoly over web content delivery systems.
Either way the folks at information week could use a touch of pertinence while delivering their comments.
That is to say in plain words that are either idiots or they are pushing agendas like any corporate monkey.
And here are quotes of comments on their own article page from people that probably developed with flash too instead of only looking at flash content as a way to make them experts on it.

Derek commented on Mar 5, 2008 4:13:57 PM Jobs is right – flash sucks. Ever try decompiling a swf file? It’s painful and arcane. Flash is ok from a user experience level and more efficient from a download perspective but the tools and formats for it are voodoo.

Webwin commented on Mar 5, 2008 4:16:24 PM Right on – I’m a developer and HATE dealing with Flash. It’s simply not open enough and as the previous poster mentioned – voodoo to some extent. As a developer I hate blindly writing to formats that aren’t open.

Shane Johnson commented on Mar 5, 2008 4:18:46 PM I’m surprised that so many sites use Flash myself. It’s about time someone stuck a flag in the ground out of defiance. There MUST be a better way to deliver video content than Flash.

kurt Witcher commented on Mar 5, 2008 4:38:18 PM I think a big problem with flash is the huge amount of processing power it takes to run. I’m guessing flash in its current form would drain the iphones battery probably 3 times faste, just so we can watch our online advertising bounce.

Tagged with:
preload preload preload