SOHO : Small Office Home Office
Freeware - Opensource software tips, tricks, tweaks & fixes for managing, securing, improving the performance of SOHO Desktop, Laptop, Networks
Freeware - Opensource software tips, tricks, tweaks & fixes for managing, securing, improving the performance of SOHO Desktop, Laptop, Networks
Sunday, June 26, 2011
Thursday, June 16, 2011
How to display memory, cpu and network usage on the panel in ubuntu 11.04?
Indicator-Sysmonitor is a system-monitor applet for Ubuntu, capable of displaying CPU, RAM and Network usage. After installation and configuring the result is as shown in the image above.
Installation:
- sudo add-apt-repository ppa:alexeftimie/ppa
- sudo apt-get update
- sudo apt-get install indicator-sysmonitor
- sudo apt-get install dstat
- Download the code from wget http://webupd8.googlecode.com/files/sysmon_0.2.tar.gz
Configuring:
- Create a folder called "scripts" in home folder
- Extract the code " tar -xvf sysmon_0.2.tar.gz "
- Now open Indicator-Sysmonitor (it should show up as System Monitor Indicator in the menu), then click it on the panel and select "Preferences" and under "Use this command", enter this: "$HOME/scripts/sysmon " as shown in the image
- Save and restart the application indicator
- To restart, run this command in terminal " killall indicator-sysmonitor " (without quotes)
By default, the script displays the RAM and network usage. You can also display the CPU usage or any other combination (display the network usage only, display all: the CPU, ram and network, etc.). For this, open the script (run the following command in a terminal): " gedit ~/scripts/sysmon "
And on top of the file you'll see something like this:
#settings:
netspeed=true
ram=true
cpu=false
What these do is pretty much obvious - change the items you want to be displayed on the panel to true and the rest to false. Feel free to tweak the script to display other stuff if you want.
Saturday, June 4, 2011
How to enable and disable user accounts in linux?
This will be useful in a situation where you don’t want to permanently remove the user from the system, but just want it disabled so that the user is no longer able to use the system. The user will still receive emails for example, but he will not be able to login and check them out.
The command to "lock (disable) a user account" is
# passwd -l username
With the above command the user account is locked and is available only to root. The locking is performed by rendering the encrypted password into an invalid string by prefixing the encrypted string with an !
The command to "unlock (enable) a user account" is
# passwd -u username
When a user tries to access an locked account, the system will return:
# su - usernameThis account is currently not available.
Wednesday, June 1, 2011
rsync for beginners
rsync -azv --progress --append --exclude=filename1 filename2 -e "ssh [options]" source destination
Options:
-a : The files are transferred in "archive" mode, which ensures that symbolic links,
devices, attributes, permissions, ownerships, recursive etc
-z : enable compression
-v : verbose
--progress : displays the progress of file transfer. This is useful if the file size is big
--append : rsync will resume file transfer from a broken pipe.
--exclude : listed files will not be transfered.
-e : Specify the remote shell to use
Example :
-e : Specify the remote shell to use
Example :
rsync -azv --progress --append --exclude=sample.txt -e "ssh -p 22022" /home/user_source/ user_destination@123.123.123.123:/home/user_destination/backup/
In the above example all the files and folder from source directory ( /home/user_source/ ) will be transfered in archive mode to the destination folder (/home/user_destination/backup/ ), where the destination computer accepts connection on port 22022. If the connection breaks, running the above command will resume the incomplete file transfer.
Importance of trailing slash
A trailing / on a source name means "copy the contents of this directory". Without a trailing slash it means "copy the directory".
Example:
rsync -a foo/ bar/
directory bar will end up with a copy of the contents of foo. So a file foo/wibble.txt will end up as bar/wibble.txt. If on the other hand you say:
rsync -a foo bar/
then you end up with a directory structure 'bar/foo/...', and wibble.txt ends up as bar/foo/wibble.txt
Other than that, the presence or absence of the trailing slash on the *target* directory doesn't make a great deal of difference. I usually try and work things so that the rsync command line always has trailing slashes on both the source and the destination directories simply for consistencies' sake.
Importance of trailing slash
A trailing / on a source name means "copy the contents of this directory". Without a trailing slash it means "copy the directory".
Example:
rsync -a foo/ bar/
directory bar will end up with a copy of the contents of foo. So a file foo/wibble.txt will end up as bar/wibble.txt. If on the other hand you say:
rsync -a foo bar/
then you end up with a directory structure 'bar/foo/...', and wibble.txt ends up as bar/foo/wibble.txt
Other than that, the presence or absence of the trailing slash on the *target* directory doesn't make a great deal of difference. I usually try and work things so that the rsync command line always has trailing slashes on both the source and the destination directories simply for consistencies' sake.
Sunday, May 22, 2011
How to Show if your server is Online or Offline?
One way to try to find out if a server is online is to try and open a socket connection to the server. If the connection fails, one can assume that the server is down (although the problem can be somewhere else too).
Continue Reading...
Check out this function and read all the user comments:
Here's a very simple demonstration of php code:
<?php if (fsockopen('www.yourserver.com', 80)){
echo('The server in online');
} else{
echo('The server in offline'); } ?>
The first parameter is the IP address of the server you want to check (in this case, www.yourserver.com, it could also be something like 111.222.333.444). The 80 is the port number (for HTTP), which can sometimes be different (21 for FTP etc.).
Monday, May 2, 2011
Change newer older post link blogger
Changing Older Post and Newer Post with Next and Previous
![]() |
| Before |
| After |
Follow the steps below:
- Log in to blogger with your ID
- Click Layout
- Click Edit HTML tab
- Click “Download Full Template”, please back up first your template (important)
- Please check the small box beside Expand Widget Template
Wait for a while until the process finished. Find the following code on your template:
<span id='blog-pager-newer-link'> <a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' expr:title='data:newerPageTitle'><data:newerPageTitle/></a> </span> </b:if> <b:if cond='data:olderPageUrl'> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' expr:title='data:olderPageTitle'><data:olderPageTitle/></a> </span> </b:if> <b:if cond='data:blog.homepageUrl != data:blog.url'> <a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a> <b:else/> <b:if cond='data:newerPageUrl'> <a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a> </b:if> </b:if>Look at the code in red printed.
Change the code <data:newerPageTitle/> with the word Next and the code <data:olderPageTitle/> with the word Previous
Click Save Template button
Finished.
Changing Older Post and Newer Post with Icon
To change Older Post and Newer Post with icon, the first step is preparing the icon which you want to use. For example the icons look like this:
Please upload the icons you have to a server that you usually use to place an image, and note the URL address. For example the icons’ URL address as follow:
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnfGeNxZD3cg4d1pOvqB6x28s9iAnFGYx6wueYWblVVk_9dgFGol1gAI1UztMb-e2EwFr9_7zML7AIlR7l6-sgTQ6g7yQ4peeaHdhKFR_u9_NgGY0T1InZrvijx43ADQEk1zM68PsHpQ0/?imgmax=800
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEighfFqF_FXvH2lVwop8r7bIV-AUx1MCCi0iPeRdUk4s6L0W3R00RNbdazJL6FpSqI1OTMnv8mvxck55NgAyKI86zf2z_2FPJkX71QSLlV5tpCNR5re7AxJVoL5zzwPLVG-XzyPDxiOHtQ/?imgmax=800
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhEaynOq39Wazewf6an5_nAHcuctGJfX8QsyVK2nz7IZbTTDUe1AkH6dH3-4wVbb1HCVIzRZl0CDhZk1-r6HeyoxE344jNIlNO40e9X0tbXdrXMNRF0TCM7ZNaAnyy5W55jhQuQ_hcUeE/?imgmax=800
Change the above code into like this:
<img alt='Next' border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnfGeNxZD3cg4d1pOvqB6x28s9iAnFGYx6wueYWblVVk_9dgFGol1gAI1UztMb-e2EwFr9_7zML7AIlR7l6-sgTQ6g7yQ4peeaHdhKFR_u9_NgGY0T1InZrvijx43ADQEk1zM68PsHpQ0/?imgmax=800' title='Next'/><img alt='previous' border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEighfFqF_FXvH2lVwop8r7bIV-AUx1MCCi0iPeRdUk4s6L0W3R00RNbdazJL6FpSqI1OTMnv8mvxck55NgAyKI86zf2z_2FPJkX71QSLlV5tpCNR5re7AxJVoL5zzwPLVG-XzyPDxiOHtQ/?imgmax=800' title='previous'/><img alt='home' border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhEaynOq39Wazewf6an5_nAHcuctGJfX8QsyVK2nz7IZbTTDUe1AkH6dH3-4wVbb1HCVIzRZl0CDhZk1-r6HeyoxE344jNIlNO40e9X0tbXdrXMNRF0TCM7ZNaAnyy5W55jhQuQ_hcUeE/?imgmax=800' title='home'/>If you have had the code as above, the next step is to place it on your template code, here are the ways:
- Log in to blogger with your ID
- Click Layout
- Click Edit HTML tab
- Click “Download Full Template”, please back up your template first (important)
- Please check the small box beside Expand Widget Templates
|
|
Wait for while until the process finished. Find this code on your template:
<span id='blog-pager-newer-link'> <a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' expr:title='data:newerPageTitle'><data:newerPageTitle/></a> </span> </b:if> <b:if cond='data:olderPageUrl'> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' expr:title='data:olderPageTitle'><data:olderPageTitle/></a> </span> </b:if> <b:if cond='data:blog.homepageUrl != data:blog.url'> <a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a> <b:else/> <b:if cond='data:newerPageUrl'> <a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a> </b:if> </b:if>Look at the code in red printed
Change the code <data:newerPageTitle/>, <data:olderPageTitle/>, and <data:homeMsg/> with your icon code. E.g.
<span id='blog-pager-newer-link'> <a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' expr:title='data:newerPageTitle'><img alt='Next' border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnfGeNxZD3cg4d1pOvqB6x28s9iAnFGYx6wueYWblVVk_9dgFGol1gAI1UztMb-e2EwFr9_7zML7AIlR7l6-sgTQ6g7yQ4peeaHdhKFR_u9_NgGY0T1InZrvijx43ADQEk1zM68PsHpQ0/?imgmax=800' title='Next'/></a> </span> </b:if> <b:if cond='data:olderPageUrl'> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' expr:title='data:olderPageTitle'><img alt='previous' border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEighfFqF_FXvH2lVwop8r7bIV-AUx1MCCi0iPeRdUk4s6L0W3R00RNbdazJL6FpSqI1OTMnv8mvxck55NgAyKI86zf2z_2FPJkX71QSLlV5tpCNR5re7AxJVoL5zzwPLVG-XzyPDxiOHtQ/?imgmax=800' title='previous'/></a> </span> </b:if> <b:if cond='data:blog.homepageUrl != data:blog.url'> <a class='home-link' expr:href='data:blog.homepageUrl'><img alt='home' border='0' src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhEaynOq39Wazewf6an5_nAHcuctGJfX8QsyVK2nz7IZbTTDUe1AkH6dH3-4wVbb1HCVIzRZl0CDhZk1-r6HeyoxE344jNIlNO40e9X0tbXdrXMNRF0TCM7ZNaAnyy5W55jhQuQ_hcUeE/?imgmax=800' title='home'/></a> <b:else/> <b:if cond='data:newerPageUrl'> <a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a> </b:if> </b:if>Click Save Template button
The example of the result will be like this:
Sunday, May 1, 2011
Back to Top floating blogger widget
“Back To Top” floating image icon at the right side of your blog. You can see this button at right side of my blog. This hack is useful if the website or blog pages are too long. It always maintains the same position and if you click on it, it will take you to the very top of the page. This saves your visitors from an unnecessary hassle of scrolling up.
Continue Reading...
1. Login in to blogger dashboard
2. Go to Layout
3. Click on Add a Gadget
4. Select Html/Javascript
5. Copy n paste the below code in above opened editor
<a style="display:scroll;position:fixed;bottom:5px;right:5px;" href="#" title="Back to Top"><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjghi3dc6GZH8dQR3xwnCIknr_IUGPPtMjyy09Qe0-Gs_IHFfCAGjlZvkyRcG3h8lSCOV-Q2XvjuAOKStIata_IuC74qcEHmhLCyZJl4y72wW1ZetP6cGgRbWAZz0srevWp_t5WEheZsLc/s42/Back-to-top.png" /></a>
Tip:
- Add the gadget to the footer
- You can change image url with your image.
Friday, April 29, 2011
Change blogger description font size
- Go to your blogger Dashboard >>Design>>Edit HTML
- Find the code
.Header .description {
font-size: 100%;
}.
- Modify the font-size accordingly
Split bloggers header in 2 columns
How to split your template's header into two columns so that you can add your widgets along with your blog's logo. By default, blogger doesn't have any option to split header column into two parts.
Just below the above code, paste the following code
It should look like this
Now search your template for the following code
Continue Reading...
Below is the how-to guide.
Go to your blogger Dashboard >>Design>>Edit HTML
Do not tick Expand Widget templates
Search for the following code in your template
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='My Test Blog (Header)' type='Header'/>
</b:section>
Just below the above code, paste the following code<b:widget id='Header1' locked='true' title='My Test Blog (Header)' type='Header'/>
</b:section>
<b:section id='header-right' showaddelement='yes'/>
<div style='clear: both;'/>
It should look like this<div style='clear: both;'/>
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='Tweak My Blogger (Header)' type='Header'/>
</b:section>
<b:section id='header-right' showaddelement='yes'/>
<div style='clear: both;'/>
Now search your template for the following code <b:widget id='Header1' locked='true' title='Tweak My Blogger (Header)' type='Header'/>
</b:section>
<b:section id='header-right' showaddelement='yes'/>
<div style='clear: both;'/>
]]></b:skin>
Add the following code just above ]]></b:skin>
#header {display:inline-block;_float:left;}
#header-right {display:inline-block;float:right;padding:15px 15px 15px 15px;}
#header-right .widget {margin:0;}
body#layout #header {width: 50%;}
body#layout #header-right {width: 50%;}
#header-right {display:inline-block;float:right;padding:15px 15px 15px 15px;}
#header-right .widget {margin:0;}
body#layout #header {width: 50%;}
body#layout #header-right {width: 50%;}
Now search your template for
]]> </b:template-skin>
]]> </b:template-skin>
and just above that, paste the following code
#layout #header {width: 50%; float: left;}
#layout #header-right {width: 50%; float: right;}
#layout #header {width: 50%; float: left;}
#layout #header-right {width: 50%; float: right;}
Last step, SAVE TEMPLATE and then go to page elements to see that your header has been spitted into two columns.
Source and credit : http://www.theinfow.com/2011/03/split-header-into-two-columns-blogger.html
Subscribe to:
Posts (Atom)





