Posts

Showing posts from November, 2011

四只老鼠吹牛Four mice boast

四只老鼠吹牛: 甲:我每天都拿鼠药当糖吃; 乙:我一天不踩老鼠夹脚发痒; 丙:我
每天不过几次大街不踏实; 丁:时间不早了,回家抱猫去咯……Four mice boast: A:
I take rat poison every day as candies; B:My feet are itching if I don't
step on rat flip everyday; C: I feel uncomfortable if I don't pass the
streets several times a day; D: the hour is late, I am back home to hold
the cat ... ...

Selenium-WebDriver

WebDriver is a tool for automating testing web applications, and in
particular to verify that they work as expected.
It's not tied to any particular test framework, so it can be used
equally well in a unit testing or from a plain old "main" method.

Changing email password in Thunderbird

Tools | Options | security | password

remove the line where your password needs to be updated

click Close and then restart Thunderbird.

The next time Thunderbird will prompt you for the password and offer to save it.

网站怎么赚钱

不要怕赚钱,不要怕被别人说商业味浓,只有赚钱了才能让 网站可以持续发展,让会员享受更好的服务,而且要越早赚钱越好。
什么赚钱就做什么
什么Alexa、PR、收录都是扯淡,个人网站能生存则是胜利,所以不应该"挑食",盈利模式应多种多样,只要不违法,什么赚钱 就尝试什么,哪怕与网站主 题无关的。
通常情况,网站盈利模式与三种:一种是最常见的-广告, 如Google AdSense(单价低但省力)、品牌广告(钱多但客户不好找);一种是增值服务(你得有点料),如:提供SEO、建站服务;还有一个就是电子商务,有买 有卖(最简单的方法就是搞个淘宝)。
以自己最擅长的为中心
什么赚钱就做什么的前提是不要偏离自己的主题,虽然船小 好调头,但不是让你觉得:今天"团购"模式很好你就搞团购网,明天微博好,你就搞微博。用自己最擅 长的技能赚钱,以它为中心,是科学发展观的核心,必须始终坚持不动摇。再 向技能以外的周边辐射你的财路。

Nagios XI default mornitor port 5666 and 5667

For Nagios XI to monitor remote Linux servers on default port, we need
to open 5666 and 5667 in the to be monitored linux servers, for example:


vi /etc/sysconfig/iptables


-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5666 -s 192.168.3.73 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5667 -s 192.168.3.73 -j ACCEPT




192.168.3.73 is your Nagios XI server

Command to Find Out Linux Distribution Name

$ cat /etc/*-release

thesantaclausparade.ca

Plain old way to change hostname of CentOs

vi /etc/sysconfig/network
change the HOSTNAME to your preferred servername

Nagios common tasks

/etc/init.d/nagios
Usage: nagios {start|stop|restart|reload|force-reload|status|checkconfig}


a brutal season for job cuts

Mid-to-late November is typically the season for layoffs, as banks want to avoid making cuts during the holidays in December. By doing it before year-end, these employees aren't eligible for bonuses.

Using-the-Nagios-XI-Virtual-Machine-With-VMware

What is "Port Forwarding" or "Tunneling"?

In addition to the direct access provided by the "ssh" and "scp" commands, the SSH protocol includes a feature called "Port Forwarding", or "Tunneling". This can be used to provide secure access to other services that do not normally encrypt data during transmission.

For example, to receive email, many email programs use the (unencrypted) POP3 protocol to connect to a mailserver on port 110. If we can SSH to the mailserver before downloading our mail, we can configure the SSH session to "forward" port 110 through the encrypted SSH link. Now, if we configure our email client to connect to port 110 on ourlocalmachine it will in fact be connecting to theremote mailserver, but all the data, (i.e. our incoming email), will be transferred over the encrypted SSH link.

If we also forward port 25, (which normally handles SMTP, the outgoing email protoc…

Page revenue per thousand impressions (RPM)

Page revenue per thousand impressions (RPM) is calculated by dividing
your estimated earnings by the number of page views you received, then
multiplying by 1000.Page RPM = (Estimated earnings / Number of page views) * 1000

cost-per-click (CPC)

The cost-per-click (CPC) is the amount you earn each time a user clicks
on your ad. In your reports, CPC is calculated by dividing the estimated
earnings by the number of clicks received.

Solution of messy code in putty terminal

Sometimes when use putty to login to CentOs and run commands such as
system-config-securitylevel, there is messy code in the window. This
happens because the remote character set in your putty configuration is
different from the linux character set. To solve the problem, First
login to the server, then runecho $LANGThis shows the character set used by the linux server.Then you click the icon in the top right corner of your login window,
click "change setting". Choose window -> translation, change the "remote
character set" to the same as the output of your "echo $LANG"

Difference between syslog facility AUTH & AUTHPRIV

AUTHPRIV is a separate bucket for routing authorization messages to a log file that has more restricted permissions that those of AUTH.  Different OS's will send different messages to AUTH vs. AUTHPRIV. In CentOs, the default is
SyslogFacility AUTHPRIV

Customizing your Logon with /etc/issue

When you first boot up your new LFS system, the logon screen will be nice and plain (as it should be in a bare-bones system). Many people however, will want their system to display some information in the logon message. This can be accomplished using the file /etc/issue.

The /etc/issue file is a plain text file which will also accept certain escape sequences (see below) in order to insert information about the system. There is also the file issue.net which can be used when logging on remotely.

change
Banner /etc/issue
in /etc/ssh/sshd_config

Centos Security Checklist -- Limit root access using SUDO

First, make sure sudo is installed (using commands such as "which sudo"), if not, using "yum install sudo" to install it.Using command "visudo",
Just uncomment the following line:

# %wheel  ALL=(ALL)       ALL
by removing the # at the beginning. This line means that anybody in the group wheel can use sudo to run anything from anywhere.

Add an account to group wheel. For example, if the account you use to perform administrative task is i88ca, rungpasswd -a i88ca wheel

Centos Security Checklist -- CheckForSecurityOnKeyFiles.sh

#!/bin/bash
#Check for Security on Key Files
#/etc/fstab: make sure the owner & group are set to root.root and the #permissions are set to 0644 (-rw-r--r--)
#verify that /etc/passwd, /etc/shadow & /etc/group are all owned by 'root'
#verify that permissions on /etc/passwd & /etc/group are rw-r--r-- (644)
#verify that permissions on /etc/shadow are r-------- (400)
ls -lh /etc/fstab
ls -lh /etc/passwd
ls -lh /etc/shadow
ls -lh /etc/group

Centos Security Checklist -- OnlyAllowRootToAccessCRON.sh

#!/bin/bash
#Only allow root to access CRON
#The cron daemon is used to schedule processes. The crontab command is
#used to create personal crontab entries for users or the root account. To
#enhance security of the cron scheduler, you can establish the cron.deny and
#cron.allow files to control use of the crontab. The following commands will
#establish root as the only user with permission to add cron jobs.
rm -f /etc/cron.deny /etc/at.deny
echo root > /etc/cron.allow
echo root > /etc/at.allow
chown root:root /etc/cron.allow /etc/at.allow
chmod 400 /etc/cron.allow /etc/at.allow

Diversity in the market

The more stocks and industries you invest in, the greater your
diversification and safety. So beware having your whole portfolio
invested in only a handful of stocks. However, if your goal is to beat
the market, you have to be careful not to take diversification too far.
If you took diversification to the extreme, you would buy all of the
stocks available in the stock markets. You would then obviously achieve
returns that would match the market, thereby negating the goal of
beating the market.

Online Free FavIcon Generator and wordpress

http://tools.dynamicdrive.com/favicon/
is a good favicon generator.

To add the favicon to your wordpress, put the icon to your root of wordpress installation. And add the line to your header.php of your child theme:



Ever wanted to move your WordPress blogs over to Blogger? This site can aid in the process!

Clickthrough rate (CTR)

Clickthrough rate (CTR) is a way of measuring the success of an online advertising campaign. The clickthrough rate of an advertisement is defined as the number of clicks on an ad divided by the number of times the ad is shown (impressions), expressed as a percentage. For example, if a banner adis delivered 100 times (100 impressions) and receives one click, then the clickthrough rate for the advertisement would be 1%.

I like Blogger

It is fun and useful.

Copying virtual machines in vmware datastore

right click your datastore, choose "browse datastore", copy the files under the folder of your original virtual machine to another new folder.

right click the .vmx file in your new folder, choose "add to inventory".

Done.