here are some links to install fonts in ubuntu:
http://embraceubuntu.com/2007/05/21/300-easily-installed-free-fonts-for-ubuntu/
http://crunchbang.org/archives/2007/10/13/465-free-fonts-for-ubuntu/
http://www.junauza.com/2008/09/100-beautiful-free-fonts-for-ubuntu.html
http://ubuntulook.com/2009/05/22/install-hundreds-of-fonts-in-ubuntu-904/
As a programmer, there are no real problems but challenges...ones that we need to overcome. This means that there is a solution for all challenges that one may face. For all the challenges that I have faced, I will share them and their solutions.
Tuesday, March 30, 2010
Friday, March 5, 2010
show html code on page
to show html code on page, you will need to replace the < with "<" and the > with ">"
that will render the code on the page as just html code
that will render the code on the page as just html code
add google site search to your web site
heres the code to add the google search to your site. you will need to change "yoursite.com" to your domain name
<form action="http://www.google.com/search" method="get"> <input name="q" size="31" type="text" /> maxlength="255" value="" /> <input type="submit" value="Google Search" /> <input name="sitesearch" type="radio" value="" /> The Web <input name="sitesearch" type="radio" /> value="yoursite.com" checked /> Ask Dave Taylor </form>
Thursday, March 4, 2010
install adobe flash player 10.1 beta in karmic
here is the link that worked for me: http://tuxarena.blogspot.com/2009/12/how-to-install-flash-player-101-beta-2.html
the instructions are below though:
sudo apt-get remove --purge flashplugin-installer
should remove your current installation of Flash. If Flash was installed manually, the plugin should be located in the ~/.mozilla/plugins directory, where ~ is the home directory. So, to remove it:
rm -f ~/.mozilla/plugins/libflashplayer.so
Next, download the archive for the new Flash player from here (direct link here), or alternately you can type in a terminal:
wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_1_p2_linux_121709.tar.gz
Make sure the current working directory is the one where you saved the archive and uncompress it:
tar -xzf flashplayer10_1_p2_linux_121709.tar.gz
Next, create the ~/.mozilla/plugins directory (if it doesn't already exist):
mkdir -p ~/.mozilla/plugins
And copy the plugin inside it:
cp install_flash_player_10_linux/libflashplayer.so ~/.mozilla/plugins
Now restart Firefox and this should be all.
the instructions are below though:
sudo apt-get remove --purge flashplugin-installer
should remove your current installation of Flash. If Flash was installed manually, the plugin should be located in the ~/.mozilla/plugins directory, where ~ is the home directory. So, to remove it:
rm -f ~/.mozilla/plugins/libflashplayer.so
Next, download the archive for the new Flash player from here (direct link here), or alternately you can type in a terminal:
wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_1_p2_linux_121709.tar.gz
Make sure the current working directory is the one where you saved the archive and uncompress it:
tar -xzf flashplayer10_1_p2_linux_121709.tar.gz
Next, create the ~/.mozilla/plugins directory (if it doesn't already exist):
mkdir -p ~/.mozilla/plugins
And copy the plugin inside it:
cp install_flash_player_10_linux/libflashplayer.so ~/.mozilla/plugins
Now restart Firefox and this should be all.
Tuesday, March 2, 2010
get youtube video id from url
i had a task to show some youtube videos on a site and had problems reading the entire url due to the # and other characters in a youtube channel. so i wrote my function below to get the youtube video id
/**
* Return video id for a youtube url
*
* @param string $url
* @return string
*/
function getYoutubeVideoId( $url ){
$id_param = "v="; //video id starts after the equal sign
$id_length = 11; //length of video id
$id_param_pos = strpos( $url, $id_param ); // get position of v from the video param
$id_param_pos += 2; //add 2 spaces to get actual video id
$video_id = substr( $url, $id_param_pos, $id_length ); //gets id from entire youtube url
return $video_id;
}
/**
* Return video id for a youtube url
*
* @param string $url
* @return string
*/
function getYoutubeVideoId( $url ){
$id_param = "v="; //video id starts after the equal sign
$id_length = 11; //length of video id
$id_param_pos = strpos( $url, $id_param ); // get position of v from the video param
$id_param_pos += 2; //add 2 spaces to get actual video id
$video_id = substr( $url, $id_param_pos, $id_length ); //gets id from entire youtube url
return $video_id;
}
Subscribe to:
Posts (Atom)