tux lock resolv.conf in ubuntu or another linux

to lock your resolv.conf


Bug Description

Binary package hint: network-manager

This bug causes name resolution to be painfully slow. If I manually remove the routers ip from resolv.conf it works normally, but next time the machine is booted the address gets added to the list again. (more…)

May 16, 2010
Posted in Linux Tips — admin @ 10:46 am

tux ubuntu Apache, PHP, mysql, and phpyadmin

Note: In this post I’ll be showing how to install Apache, php, MySQL and phpMyAdmin (one by one) on Ubuntu 8.10 using Terminal. If you want to install them all at the same time with minimal fuss, I recommend you to read my post on installing LAMP.]

Installing Apache

1. Open Terminal (Application -> Accessories -> Terminal) and execute the following command:

sudo apt-get install apache2

2. When the setup is complete you can check if the Apache is working properly by pointing your browser to http://localhost. If you see the text “It works!”, it means Apache is working just fine.

3. Towards the end of the installation if you see a message like this inside Terminal, “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName“, you can fix this by executing the following command. It will open Gedit (text editor).

gksu gedit /etc/apache2/conf.d/fqdn

4. When Gedit opens, type “ServerName localhost” inside the file and click Save. Then close the file.

Installing php5

1. Inside Terminal, execute the following command:

sudo apt-get install php5 libapache2-mod-php5

2. When setup is complete, you have to restart Apache so that php5 will work on Apache. Execute the following command in Terminal:

sudo /etc/init.d/apache2 restart (more…)

May 7, 2010
Posted in Linux Tips — admin @ 12:52 pm

tux Yakuake Autostart (KDE)

Make Yakuake autostart:

Open up your home folder; make sure you can see your hidden files.
Navigate to the .kde/Autostart folder and create a new text file: yakuake.
Paste this in the file:

#!/bin/bash
/usr/bin/yakuake

Start up your new Yakuake Terminal and press F12.

~/.kde/Autostart/
chmod +x yakuake

Next time you start Ubuntu Yakuake will be running. You just need to press F12 to access it.
To configure it you can right click on the Yakuake screen and use the menu.
The size of the window and other settings can be accessed by clicking the small down arrow at the bottom right of the screen.

May 4, 2010
Posted in Linux Tips — admin @ 8:18 pm

tux Fatal error: Allowed memory size wp-settings.php on line 307

if you get an error like this: Fatal error: Allowed memory size wp-settings.php on line 307

(more…)

February 24, 2010
Posted in Uncategorized — admin @ 1:01 am

tux Do not start MySQL on startup

Stopping to autostart mysql service

(firstly u must be sure to there is a<strong> /etc/init.d/mysql or mysqld</strong> )

# chkconfig --list | grep mysqld
mysqld          0:off   1:off   2:off   3:on   4:on   5:on   6:off
# chkconfig --level 345 mysql off
error reading information on service mysql: No such file or directory
# chkconfig --level 345 mysqld off
# reboot
December 20, 2009
Posted in Linux Tips — admin @ 3:34 pm

tux How to autostart MYSQL (init.d and chkconfig)

chkconfig

The chkconfig command can also be used to activate and deactivate services. If you use the chkconfig –list command, you will see a list of system services and whether they are started (on) or stopped (off) in runlevels 0-6 (at the end of the list, you will see a section for the services managed by xinetd.
(more…)


Posted in Linux Tips — admin @ 3:30 pm

tux Drawing Line With DDA Algorithm using OpenGL in C++

The code is based on the popularly used dda line drawing algorithm.It picks up two point from the window and change the color of pixels which are closest to vectorial line between them.
(more…)

December 6, 2009
Posted in C++, OpenGL — TaZ @ 9:38 pm

tux xml to text with php

There is lots of xml reading methods and classes. Some of them is too compicated. if you want to read xml with real php and simpliest way, u can use this code

(more…)

December 2, 2009
Posted in Php — banias @ 8:57 pm

tux How to Use Template Class or Function in C++ (Stack Implemantation)

How to Use Template Class or Function in C++ (Stack Implemantation)

1-How to use a function with different data types in c++. i mean, i have a function
that name is abs() and i want to use it just like this:

int x;foo(x); or
float x;foo(x); or
char x;foo(x)…
(more…)

November 30, 2009
Posted in C++ — banias @ 12:44 pm

tux How to Decoding Morse and Encoding Morse with Python

Python Morse Converter

Maybe one day you can meet an asume alien girl however she don’t know any language except morse alphabet (she communicates only this way:-)). So, what will you do? Dont be sad cause i wrote a python code to decode what she says and encode yours.
(more…)


Posted in Python — banias @ 12:35 pm
Next Page »