Jan 28 2010

SourceForge is restricting Syrian users from Uploding/downloading OPEN-SOURCE projects

The open-source small community in Syria is very upset, We are already suffering because of the bad infrastructure of the internet and electricity, I know the last one is so funny but true, Also the Source Forge is not the first or the only site banded Syrian users, Google, Activestate, Mysql, Sun and much more had banded Syrians from downloading/uploading projects or software, for sure that will make our life more difficult than now, and again that will reflects badly on the software industry that’s almost dead, increase piracy, and creates huge problems for university students and educational processes that is BASED on open-source software, as well as it will kill the small open-source projects that has been started recently in Syria.

The USA government have no rights to control the open-source projects, because it’s open-source and these projects are developed by people around the world including people from these banned countries, please Sourceforge read again the open-source definition: “5. No Discrimination Against Persons or Groups”.

Oh! I forgot to tell you about something funny, In Syria We have KFC and Marlboro so WHY CAN NOT WE HAVE GOOGLE CODE OR SOURCEFORGE??!!!. That makes me somehow remember a funny quote when Homer Simpson said “I have 3 kids and no money. Why can’t I have no kids and 3 money?”.


Mar 19 2009

Howto install rails 2.3 and ruby 1.9 on ubuntu for mysql and sqlite3

Prerequisite
As a prerequisite you will need to install the following packages,these packages are build tools and libraries you will need for compilation process.

sudo apt-get -y install libc6-dev libssl-dev libmysql++-dev libsqlite3-dev make build-essential libssl-dev libreadline5-dev zlib1g-dev

Installing Ruby 1.9.1

cd ~
mkdir src
cd src/
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz
tar xzvf ruby-1.9.1-p0.tar.gz
cd ruby-1.9.1-p0/
wget http://redmine.ruby-lang.org/attachments/download/237
patch -p1 < 237
./configure --prefix=/usr/local --with-openssl-dir=/usr --with-readline-dir=/usr --with-zlib-dir=/usr 
sudo make && sudo make install

To make sure form your ruby version use the following command line.

ruby -v

The output should be something like this

ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]

If this command only returns “Happy new Ruby” please feel comfortable, your instllation is going fine.

ruby -ropenssl -rzlib -rreadline -e "puts 'Happy new Ruby'"

Ruby 1.9 bundles rubygems so there is no need to install it.

Installing mysql-ruby adaptor

cd ~/src
wget http://rubyforge.org/frs/download.php/51087/mysql-ruby-2.8.1.tar.gz
tar xzvf mysql-ruby-2.8.1.tar.gz
cd mysql-ruby-2.8.1
sudo ruby extconf.rb
make
sudo make install

Installing rails and other stuff

sudo gem install rails rake rack sqlite3-ruby

To make sure that all packages are successfully installed use the following command line

gem list

The output should be something like this

actionmailer (2.3.2)
actionpack (2.3.2)
activerecord (2.3.2)
activeresource (2.3.2)
activesupport (2.3.2)
rack (0.9.1)
rails (2.3.2)
rake (0.8.4)
sqlite3-ruby (1.2.4)

Now you can create and run a new rails application working on ruby 1.9 “.

For mysql database

rails yourapp --database=mysql

For sqlite3

rails yourapp
rubyonrails 2.3

rubyonrails 2.3

With best wishes for fast performance.


Jan 20 2009

Colorize your Bash prompt

colored_bash_prompt

echo 'if [ -f /etc/bash_colorize_prompt ]; then' >> "$HOME/.bashrc"
echo '     . /etc/bash_colorize_prompt' >> "$HOME/.bashrc"
echo 'fi' >> "$HOME/.bashrc"

then

sudo su

and

> /etc/bash_colorize_prompt
echo "## Colors" >> /etc/bash_colorize_prompt
echo 'LFRED="[\033[01;31m]" # foreground light red' >> /etc/bash_colorize_prompt
echo 'RS="[\033[0m]"    	# reset' >> /etc/bash_colorize_prompt
echo 'FYEL="[\033[33m]" 	# foreground yellow' >> /etc/bash_colorize_prompt
echo 'LFGRN="[\033[01;32m]" # foreground light green' >> /etc/bash_colorize_prompt
echo 'FBLE="[\033[34m]" # foreground blue' >> /etc/bash_colorize_prompt
echo 'if [ "$USER" = "root" ]; then' >> /etc/bash_colorize_prompt
echo '        PS1="${LFRED}u${RS}@${FYEL}h${RS}:${FBLE}w${RS}# "' >> /etc/bash_colorize_prompt
echo 'else' >> /etc/bash_colorize_prompt
echo '        PS1="${LFGRN}u${RS}@${FYEL}h${RS}:${FBLE}w${RS}$ "' >> /etc/bash_colorize_prompt
echo 'fi' >> /etc/bash_colorize_prompt
echo 'if [ -f /etc/bash_colorize_prompt ]; then' >> "/root/.bashrc"
echo '     . /etc/bash_colorize_prompt' >> "/root/.bashrc"
echo 'fi' >> "/root/.bashrc"

Now the last step

source ~/.bashrc

Congratulations.


Jan 15 2009

We will not go down

Special thanks to Michael Heart for this great song, that reflects what’s happening now in Gaza, you can click here to download it, and scroll down for lyrics.

Michael Heart

Michael Heart



WE WILL NOT GO DOWN (Song for Gaza)

(Composed by Michael Heart)
Copyright 2009


A blinding flash of white light
Lit up the sky over Gaza tonight
People running for cover
Not knowing whether they’re dead or alive


They came with their tanks and their planes
With ravaging fiery flames
And nothing remains
Just a voice rising up in the smoky haze


We will not go down
In the night, without a fight
You can burn up our mosques and our homes and our schools
But our spirit will never die
We will not go down
In Gaza tonight


Women and children alike
Murdered and massacred night after night
While the so-called leaders of countries afar
Debated on who’s wrong or right


But their powerless words were in vain
And the bombs fell down like acid rain
But through the tears and the blood and the pain
You can still hear that voice through the smoky haze


We will not go down
In the night, without a fight
You can burn up our mosques and our homes and our schools
But our spirit will never die
We will not go down
In Gaza tonight
 


Dec 13 2008

Ubuntu 8.10 no sound after resume suspend/hibernate problem

This problem made me afraid to click-on suspend button for along time, and I tried my best to keep the mouse arrow away from that button, but finally I had a free time to do some troubleshooting,
Now to get rid from this problem you can execute the next lines in your terminal

1
2
3
4
5
6
7
pkill -9 pulseaudio
/usr/bin/pulseaudio -D --log-target=syslog
sudo su
echo "pkill -9 pulseaudio" > /etc/acpi/resume.d/99-restart-pulseaudio.sh
echo "/usr/bin/pulseaudio -D --log-target=syslog" >> /etc/acpi/resume.d/99-restart-pulseaudio.sh
chmod 755 /etc/acpi/resume.d/99-restart-pulseaudio.sh
chown root /etc/acpi/resume.d/99-restart-pulseaudio.sh

Enjoy.