Very useful Skype emoticons (Additional emoticons)

(finger)  (finger)

(bandit)  (bandit)

(drunk)  (drunk)
(heidy)  (heidy)

(mooning)  (mooning)

(smoking) (ci)

(toivo)  (toivo)

(rock)  (rock)
(banghead)  (headbang)

(bug)  (bug)

(heidy)  (fubar)

(tmi)  (tmi)

0 Comments

Adobe Air 3 Beta for Flash Builder

Adobe released Air 3 this month. The new Flash Builder is coming with Adobe Air 3. Those who already installed Flash Builder can upgrade the Air SDK to 3. This video will help you in this case.

Thanks CrosByMichaela for sharing this.

Air 3 has many support for mobile development. For example, it has now support of iPhone application background running features such as play audio, access internet, use voice service, and location based services.

Flash build iPhone profile xml file now supports properties like:

1
2
3
4
5
6
7
8
9
10
11
    <key>UIDeviceFamily</key>
         <array>
                    <string>1</string>
                    <string>2</string>
          </array>
     <key>UIBackgroundModes</key>
     <array>
                <string>audio</string>
     </array>
     <key>UIRequiresPersistentWiFi</key>
     <string>YES</string>
0 Comments

Mr Me is totally new now

This is the 200th article of sajithmr.me

So, I thought to write something special and it is regarding the new website.

New theme, New WP Version, New Server,  New Logo, Mr Me is totally new

 

3 Comments

Audio recording using Flash

Audio recording using Flash
======================

To Record voice from web we need the following thing:

1) A flash media server (eg: Adobe Media Server [paid] or Red 5 [free])

2) Java6

3) Webserver (eg, Apache, PHP)

4) A flash client app to record voice

The one I used
=========

We used Red 5 Server, because it is FREE and Open Source

We can proceed with our Apache + PHP

Flash Recorder APP from AVChat (They have Free Trial recorder for 30 days and the Full version costs around £50)

Installation
=======

Install Java 6 (find the correct build based on 64 bit or 32 bit processor)

install RED 5 (Download from http://code.google.com/p/red5/)

Run RED 5 and test the installation

Open a browser and type: http://127.0.0.1:5080/

If the installation is success, you can see the RED5 page

Try to install some demo app and try those demos

You need a Browser with Flash support to test the demos (Allow the security options)

Voice Recorder Client App
=================
You can many FREE recording app over internet. Even you can get the Action Script for Voice recording and you can create your-own Flash recorder if you know Flash

A better voice recorder app can be found at http://flvar.com/ which has PHP and ASP support where you can save/manipulate the recorded file

The AVChat App
===========

Download the chat app from the site http://flvar.com/

There are two sets of folders, on for red5 and one for web server.

Put the red5 projects in your webapps folder of RED5 server root

When you download the app, you’ll get a license key. Enter this key to the property file inside the red5 server app.

Put the web server folder in your apache web root

Open avc_settings.php and update the path of RED5 with your RED5 server path (see the example in the document)

Try accessing this project with your web browser, if you can see the flash player , it means your web app works fine

Try start recording, and if you can record, which means your RED5 server configuration is fine

Stop recording and click “Save”

Check for the recorded flv file in the RED5 stream folder.

This “Save” action trigger save_audio_to_db.php where we get details of the recorded stream and we can use PHP to manipulate that.

For example, to move the flv file into webserver root, or use FFMPEG to convert the FLV format to WAV or MP3 etc

Enjoy Voice Recording :)

– Sajith

 

5 Comments , , , ,

Find and Remove a particular folder or file in Mac/Linux

Open a Terminal, and browser to the folder we want to start recursive deletion and run the following command , for example to delete all folder named .svn

find ./ -name “.svn” | xargs rm -Rf

 

0 Comments , , , ,

QR Code Generator

A PHP based tool to generate QR Code for your website URL.

http://qrcode-factory.com/

Now a days, the usage of QR code is higher and this is becoming one of the PR generating mechanisms.

QR code is another kind of bar code called matrix bar code.  QR stands for Quick Reader (source: WikiPedia)

The tool is created using PHP QR code library.

Use RedLaser Apps for mobile devices to read QR codes.

0 Comments

Install FFMPEG in MAC

Install port first

Run: sudo port -fvds selfupdate (to get the recent list)

port search ffmpeg

port variants ffmpeg

sudo port install ffmpeg +gpl +lame +x264 +xvid

Install java before these steps


0 Comments , , , ,

New URL Shortener

I recently started a new URL shortener service. If you’re bored with old short-url services, you can start using this :)
http://zip.ms

Here you can set your-own custom alias, than some random string.

I used Phurl library to create this website.

I have no spam guard added in the site, please be a real human, I trust you :)

– Sajith

3 Comments , , ,

Check Public IP in Unix (Linux)

Use the below code to check your public IP from your linux console.

wget -q -O – checkip.dyndns.org|sed -e ‘s/.*Current IP Address: //’ -e ‘s/<.*$//'


1 Comments , , , , ,

getId3 – PHP library for audio contents

I recently use getId3 library to manipulate audio files from PHP. It is very accurate than FFMPEG. For example, FFMPEG is not helpful for audio files having VBR (Various Bit Rate).

It returns error

max_analyze_duration reached

OR

“Estimating duration from bitrate, this may be inaccurate”

But by using getId3, we can retrieve detailed information about a particular audio file (WAV, MP3 or any)

This library can be used for any kind of medias.
You can download it from http://getid3.sourceforge.net/

– Sajith


0 Comments , , , , , , , ,

How to Set Up a Low Cost Office

In the present financial climate, many people are setting up their own businesses to make money. This has resulted in lots of small companies being created on the fly. So if you’re setting up your own office here’s how to do it in a cost effective method. Tricks like setting up remote offices and using conference calls to liaise with clients, which can save you a lot of money and help keep your new venture afloat.

Remote offices are a great way to save money. Having people work from home means you don’t need to rent an office and pay bills. Instead of investing in IT infrastructure you can use good remote systems for emailing and calendars. Google Apps is a great system for this: they provide calendars, document sharing and, of course, email. Google is obviously the biggest name in the business so your employees should know how to use it, and you can count on the system to be reliable. Skype is another good application that will help you run a remote office. Free calls between Skype accounts mean you can talk face to face with your co-workers without having to be in the same location. All of this relies upon your employees having access to the internet at home, but that obstacle aside, there is nothing to stop you from saving a great deal of money with a remote office.

Using conference call providers for your office can help limit costs as well. Travelling to meetings can be very expensive when you combine transport costs with working time lost on the road. Conference calls are also useful if you are running a remote office. They’ll allow you to get your entire office on the line for weekly meetings without having to book a meeting venue.

Finally, look for ways to limit paper use. Printers cost a great deal of money to buy, run and maintain. There is also much less need for paper copies these days as almost everything can be sent by email or, for larger items, file transfer services like youSENDit. These methods are free and incredibly quick. So when setting up your office, try to make it as paperless as possible, this will help you save a great deal of money and increase the speed of your business.

So there are three ways to help you set up a cost effective office. By running an efficient office you give your new business the best possible chance to succeed.

4 Comments , , ,

Access 401 authentication with Curl

When we implement Curl for an URL where 401 authentication is made (The pop-up for username and password when we access that url through browser), we can pass the username and password parameter along with the calling URL.

For example: for your url, www.abc.com to by pass authentication in one go, we can use, http://username:password@www.abc.c

The same will work with browser as well. But it is not recommended to use this way due to security concerns (Your username and password can be retrieved from browser history or some other way in this case)

But when we come to CURL, we can follow this method.

eg:

$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // return headers
CURLOPT_FOLLOWLOCATION => true, // follow redirects
CURLOPT_ENCODING => “”, // handle all encodings
CURLOPT_USERAGENT => “spider”, // who am i
CURLOPT_AUTOREFERER => true, // set referer on redirect
CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect
CURLOPT_TIMEOUT => 60, // timeout on response
CURLOPT_MAXREDIRS => 10, // stop after 10 redirects
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_SSL_VERIFYHOST => false
);

$CURLREQ = curl_init(‘http://username:password@abc.com’);
curl_setopt($CURLREQ, CURLOPT_HTTPGET, true);

curl_setopt_array($CURLREQ, $options);

$content = curl_exec($CURLREQ);
$err = curl_errno($CURLREQ);
$errmsg = curl_error($CURLREQ);
$header = curl_getinfo($CURLREQ);
curl_close($CURLREQ);

echo $content;


0 Comments , , , ,

Symfony 1.4 Installation Steps


1) Set up for SVN repository
2)Create three folders trunk, tags and branches (optional)

3)make directory lib/vendor inside trunk folder (or your project folder)

4)CD to lib/vendor folder

5) svn propset svn:externals ‘symfony http://svn.symfony-project.com/tags/RELEASE_1_4_0′ .

6) Type: svn update (it will download all the symfony files)

7)Create project:
php lib/vendor/symfony/data/bin/symfony generate:project projectname

8) Commit everything (If you need you can avoid cache and log from committing)

9) Generate app
php symfony generate:app frontend

10) Change permission of cache and log folder to 777

Then it is done, you can now start your project


2 Comments , , , ,

Rsync, not FTP


FTP is good for smaller projects. But when you work on big projects, with a team, it is hard to manage your deployment with FTP alone. You need to sort items by date and need to upload one by one.

So, use rsync from command line, which does the synchronisation and it is much faster than FTP.

The advantage is ‘dry-run’. You can see those files which has changes on it. In is just like a test run and after if you are happy you can do the real go.

The option to exclude files or folders from synchronisation is another advantage. This will help to exclude caches, uploads or temporary files or folders, svn files , local configuration like db configs etc.

Here is one example:

rsync -v -t -r –dry-run –exclude ‘*.svn’ ./* username@hostname.com:/full/path/to/your/webroot

You can use a many switches like -v (verbose) -r -t etc. (try –help for all)

–exclude switch is for to mention the file to be excluded. You can use exclude several times. If you have more files to exclude, you can put them in a text file and can use

–exclude-from switch to mention the file name which contains the list of files to be excluded

(For symfony developers they have a built-in rsync)

For more help, go: http://sial.org/howto/rsync/


0 Comments

jQuery Traversing Tips

Just a quick review of tips available in jQuery to manage nodes (contents) near by the content / node which is triggered an event, like click, hover etc

Functions: find, parent, parents, children, first, last, closest

Suppose you need to manage some nodes nearby a link or a button on an event.

Say $(‘.button’).click(function(){

// code goes here

})

To get the current parent of triggered element, use $(this).parent()

To get the parent which has a class , use:
$(this).parents(‘.classname’);

To find any other element just above the node, use :
$(this).parents(‘.classname’).find(‘li’);

to get the first element in find, use find(‘li:first’)

and for last, use li:last

To get exactly the child nodes, use:
$(‘.classname’).children(‘some_selector_here’);

Here comes another very useful function, which is, closest

$(this).closest(‘td’) etc

So, this quick note will be helpful to you

Thanks

Sajith


0 Comments , , , , , , , , , , ,