Javascript introduction

[php]<script type="text/javascript" src="script.js"></script>[/php]

the line above is one of some ways to include javascript to your web page. it will make sure you have separated script file to include, rather than writing scripts directly to the same html page with the content.

second way to include javascript is by writing or embed the script directly on our html page. for example in this page i wrote

[php]<script type="text/javascript">
alert("Admin Says Hi!!");
</script>[/php]

so that u will see box appear says “Admin Says Hi” with OK button.

further use of javascript provides u amazing ways to make your html page more beautiful. for example in news flash, picture gallery, slider, dll.

javascript in act: Continue reading Javascript introduction

Understanding GPS : Global Positioning System

GPS or Global Positioning System is space-based global navigation satellite system (GNSS). GNSS is used for satellite navigation system with global coverage. GPS provides location and time information in all weather, anywhere on Earh (where there is an obstructed line to four or more GPS satellite). GPS is maintained by United States goverment and available to anyone with GPS receiver.

gps satellite

Other satellite positioning systems available are GLONASS from Rusia, Compass

Continue reading Understanding GPS : Global Positioning System

Joomla : Change Forgotten Administrator Password

sometimes we easily forget our password when its never used.
in this case i forgot my joomla administrator password.
i found this post in joomla documentation and re-blog it to make me remember it more.

joomla
joomla logo

1. Go to your phpmyadmin page
2. Open your joomla database
3. Find jos_users table, (in your database the prefix jos… according to your setting, sometimes named josroot_users or any other name)
4. Click that table and choose browse on the top mysql menu.
5. Edit (on name coloum) administrator entry.
6. On password option insert your new password in md5 code.
(u can generate it in this page)
7. Click Go

Add New User on Ubuntu

To add user on ubuntu we can use useradd command, which has some options. For example we want to create new user named “cooluser” with password “usercool”, and we want to make the home directory in /home/cooluser

[php]useradd cooluser -p usercool -m [/php]

this command will create new directory in /home/cooluser

to delete user use this command

[php]userdel cooluser[/php]

to observe other option just use man command

[php]man useradd[/php]

Automatically Create Read More Page WordPress

For your each of your wordpress web you have your own themes. Each theme has its own setting. For example, originally my themes didnt create “Read More” for each article in home page. Manually i can set it up in my new post. Simply by clicking more icon in the middle or after some words in article. The result will be home page with list of my posts, but now it has read more section that will drive the user to single post format.

If you want to do it automatically u can choose or use the_excerpt() function instead the_content() function.
You can do this to you home page by doing these steps :
1. Open Your dashboard
2. Go to Appereance ===> Editor
3. Choose index.php to be modified
4. Find string the_content()
5. Replace it with the_excerpt()
6. Update/Save this modification

Now you will have automatically created read more section for all your posts displayed on your homepage

Find Out Operating System Version

Sometimes we need to determine what version of our OS. Mostly for all unix, linux os we can do it with ‘uname’ command. for FreeBSD it works well and we can see directly what version our FreeBSD is, but for ubuntu and centos we can get it straight what we need because instead of display OS version its just will display the kernel version.

then i find out that we can use this command

1. cat /etc/issue

2. /etc/lsb-release

3. cat /etc/apt/sources.list (by seeing repository)

On debian u can use this command (in order)

1. cd /etc

2. ls | grep version

On FreeBSD

1. uname -a

How To List Hardware on FreeBSD

u can use sysctl and dmesg to list all your hardware on freebsd

example
# sysctl -a

then use grep and egrep to choose what hardware you like to display

1. CPU

# sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'

2. Memory
# sysctl -a | grep mem
or for good display u can see this page
http://www.cyberciti.biz/faq/freebsd-command-to-get-ram-information/

3. Harddisk

# egrep 'ad[0-9]|cd[0-9]' /var/run/dmesg.boot

4. Ethernet
# ifconfig