Currently Viewing Posts Tagged tips

Force IPv4 when using APT command in Ubuntu

Sometimes you may want to disable IPv6 when using apt update command or some other apt operation.

If you want to use IPv4 in one command, just run following:

$ sudo apt -o Acquire::ForceIPv4=true update

If you want to force to use IPv4 for all apt operations, add a new file under /etc/apt/apt.conf.d/

$ sudo nano /etc/apt/apt.conf.d/99force-ipv4

Then add a line:

Acquire::ForceIPv4 "true";

If you want to disable IPv4, change the IPv4 to IPv6.

Things You Don’t Know about iPhone : Infographic

Do you know how to save buttery life when it’s very low without turning on the airplane mode? What magic can you do with Siri except asking her to open an app or call somebody? Do you know that you can check one’s frequent locations just by looking into his iPhone? Read the following infographic to learn some tips and tricks of iPhone that you probably didn’t know.

Infographic created by IOTransfer – iPhone manager for iPhone/iPad backup and management.

 

 

 

Google Penguin and Link Building for Small Businesses: 4 Tips

When Google Penguin 4.0 was released in October of 2016, one of its main goals was to target and reduce the rank for sites that were found to have poor links. While the Internet search engine giant’s intention was to improve user experience and de-index spammy sites, some webmasters with legitimate websites took a hit. If your website was one of the many small business sites flagged by the Google Penguin update, then you may still be trying to repair the damage that was done. However, there are ways to protect your site and avoid having it ranked down further.

 

1.      Be Diverse with Links and Anchor Text

 

The best way to protect your small business site from getting slapped by Penguin is to have a great deal of diversity with your anchor text and link building. Anchor text is what creates links on your page (or “clickable” text,) and this is mostly what Google Penguin is targeting. If you create too much of this text on your site and do not diversify your keywords and anchor text, there is a good chance that you might incur a penalty.

 

Instead of trying to use these keywords to increase your ranking, try to focus on the right kind of link building that will both avoid this problem and bring increased traffic to your site. The links that you create should be focused on quality, not quantity. This may take some more time and effort on your part, but effective Google marketing is not accomplished overnight, so building up a quality website with researched keywords will help you avoid incurring future penalties.

 

2.      Avoid Older Link-Building Tactics

 

Some small business owners take advantage of forum profiles and comments with built-in backlinks for link building, but this is now a dangerous tactic with Google Penguin. It’s easy to create these links, but it is unwise to rely on them too much. Even if you are making relevant comments on a site, if you make too many, you might be targeted. Instead, focus on creating backlinks from quality sites.

 

Link building through social sites, such as Twitter and Facebook, is usually more effective when it comes to both increasing traffic and protecting your site from being penalized. If you want to avoid the Google Penguin slap, then learning quality link building can be one of the best ways to do so.

 

3.      Remain in the Know

 

One of the most effective ways to avoid being penalized by Penguin can be to stay informed about changes to the algorithm. This can help you avoid making errors that you might otherwise make out of ignorance when it comes to link building for business.

Google creates updates at least a few times over several years and the results from previous updates may take time to show, so track your rankings carefully and set up Google alerts for keywords pertaining to Penguin algorithm changes to ensure that you’re always in the know when it comes to keeping your site on track with the company’s link building guidelines. You can also follow the company on social media to read about the latest news and updates.

 

4.      Look To Successful People for Guidance

 

Proper coding, link building, and backlinking can be frustrating, especially when your business is new and there are many other duties to perform. However, you can look for guidance by following in the footsteps of other successful entrepreneurs, such as technology and communications expert Peter Foyo, who has used his knowledge and talent to build his company, Principal Standard Group, to international success. Studying his techniques and those of other powerful entrepreneurs can keep you motivated, even when the odds seem insurmountable.

 

Staying in the good grace of Google Penguin and its algorithms can be daunting for you as a small business owner. However, staying updated and building healthy linking practices can help you succeed.

 

How to determine Water Heater Age

It is hard to find the date of manufacture of Hot Water Tank, or Water Heater. Most of time they do not put the date on the plate.
But we can decode from the serial number. Let me show you how to determine the age of Hot Water Tank of different brand.

 

Manufacturer

Trade Names

Where to Look

How to Decode

Example

American ACE, American, American Hardware, America’s Best, Apex, Aqua Temp, AquaTherm, Aquamatic, Best, Best Deluxe, Champion, Craftmaster, De-Limer, Deluxe, Eagle, The Earl’s Energy Conservation Water Heater, The Earl’s Energy Saver Plus, Envirotemp, Four Most, Hotmaster, Hotstream, King-Kleen, King-Line, Master Plumber, Nationaline, Neptune, Penquin, Premier Plus, Premier Plus Self Cleaning Prestige, ProLine and ProLine Plus, Quaker, Quick-Flo, Raywall, Revere, Riveria, Sands, Sentinal, Servi-Star, Shamrock, Special Deluxe, Standard, Super Eagle, Super-Flo, Supreme, Sure-Fire, Thoro-Clean, Tru-Test, Tru Value, U.S. Supply, Whirlpool, XCL Energy Saver Serial # – 1st 4 digits 1st 2 digits = year

2nd 2 digits= week

8906xxx = made in the 6th week of the year 1989
Apollo Comfort Products Apollo
Bradford-White Bradford White, JetGlas Serial # – 1st 2 letters 1st letter = year starting with A as 1984,

2nd letter = month with January (A) through December (M)

JMxxx = made in the year 1992 (J) in the month of December (M)
Crispaire E-tech
GSW Water Heating John Wood, GSW, Moffat, Superflue, Medal Serial # – 1st 4 digits 1st & 2nd number = year,

3rd & 4th number = month

8901xxx = made in the year 1989 in the first month, January
Heat Transfer Products Heat Transfer
Lochinvar Energy Saver, Golden Knight, Knight
Marathon Marathon Serial # – 1st 4 digits 1st & 2nd digit = month,

3rd & 4th digit = year

0189xxx = made in the year 1989 in the first month, January
Maytag Maytag
Rheem Aqua Therm, General Electric, Hotpoint, Professional, Rheem, Vanguard, Western Auto Serial # – 1st 4 digits 1st & 2nd digit = month,

3rd & 4th digit = year

0189xxx = made in the year 1989 in the first month, January
Richmond Richmond Serial # – 1st 4 digits 1st & 2nd digit = month,

3rd & 4th digit = year

0189xxx = made in the year 1989 in the first month, January
Ruud Professional, Ruud Serial # – 1st 4 digits 1st & 2nd digit = month,

3rd & 4th digit = year

0189xxx = made in the year 1989 in the first month, January
Sears, Roebuck and Co. Kenmore
A.O. Smith Water Products National, A.O. Smith, Glascote, Perma-Glas Serial # – 2nd, 3rd, 4th characters 2nd position (letter) = month (A being January through M being December)

3rd & 4th position (numbers) = year

AJ89xxx = made in October (J) of 1989
State Industries State Serial # – 1st 3 characters first letter = month (A being January through M, being December), 2nd and 3rd position (numbers) = year J89xxx = made in October of 1989
Summit Manufacturing

Mortex

Sun Therm
U.S. Craftsmaster

Water Heaters

Ace, American Hardware, America’s Best, Apex, Aqua Temp, Aqua Therm, Aquamatic, Best, Best Deluxe, Craftmaster, De-Limer, Deluxe, Eagle, The Earl’s Energy Conservation Water Heater, The Earl’s Energy Saver Plus, Envirotemp, Four Most, Hotmaster, Hotstream, King-Kleen, King-Line, Master Plumber, Nationaline, Neptune, Penquin, Prestige, Pro-Line, Pro-Line Plus, Quaker, Quick-Flo, Raywall, Revere, Riviera, Sands, Sentinal, Servistar, Shamrock, Special Deluxe, Standard, Supereagle, Super-Flo, Supreme, Sure-Fire, Thoro-Clean, True-Test, Tru Value, U.S. Craftmaster, U.S. Supply, Whirlpool, XCL Energy Saver Serial # – 1st 4 digits 1st 2 digits = year

2nd 2 digits= week

8924xxx = made in the 24th week of the year 1989
Vaugn Manufacturing Corp. Sepco, Hydrohot, D.W. Whitehead

Continue reading “How to determine Water Heater Age”

Asus O!Play HDP-R1 V1.38N

Last time I upgraded Asus O!Play to v1.33N in last Oct. So check the official site, found the latest one is v1.38N.
There is also v1.35N in between.
The updates from v1.33 to v1.38 are below.

  • Add new feature: Hungarian menu support.
  • Fix bug: O!Play will restart when inserting ASUS HS-1000W.
  • Added MKV header compression format support
  • Fixed the bug: The “N” letter of Greek subtitle cannot be displayed correctly on the screen.

Continue reading “Asus O!Play HDP-R1 V1.38N”

Expend your CityVille by more friends

CityVille was introduced by my friend. She knew I like to play SimCity style games. So when I start to play CityVille, I can not stop.
I spend a lot of time on this game. See my current status of City of David Yin.

CityVille is a wonderful game. I like it.

If you have never played it, just try it.

If you try it, you will like it.

If you like it, you can not stop playing.

cityville

This is only half of my City.

The tips to expend your city are very simple. I would like to share my experience.
1) Check your city regularly. At least 4 hours a time at daytime.

2) Farming is best to use 1 day corn, 2.1 days wheat, and 3.1 days peas. If there are no task to harvest others.

3) Use City sidewalk to connect buildings, which can save space for building.

4) Click your neighbors post on the Game, when you give your gift, you get one as reward.

5) More friends, more neighbors. This is the key to make your city expending faster.

Continue reading “Expend your CityVille by more friends”

What can go wrong when including another file into your php file

It is very often to include another file as a part of your script.

require_once("/path"/to/file.php");

When do this kind of including, should be very careful on following parts.
1) The path to the script is wrong.
2) The path to the script is correct, but the script is in a forbidden directory.
3) The include file has a blank line or space before or after the code in the PHP script.
It is very easy to omit the space after the code.
4) The include file can be viewd by non-PHP methods.
5) You’re in include overload.
6) You are using unchecked variables as include filenames.
It may make your site unsafe in some situation.
The tips of including file are learned from “Wicked Cool PHP”

Another Ten PHP Optimization Tips

I wrote PHP Optimization to improve performance. Now I have another ten PHP optimization tips for you.

1. Single-quoted strings.

Use single quote when possible. It is faster than double quote.
If it is string only, just pick single quotes.

2. The way output data.

Could you point which is the fastest way to output from below?

print "Hi my name is $a. I am $b";
echo "Hi my name is $a. I am $b";
echo "Hi my name is ".$a.". I am ".$b;
echo "Hi my name is ",$a,". I am ",$b;

The last one is actually the fastest operation.

3. Use single-quotes around array indexes.

So, $x[‘sales’] is alway best format and fast.

4. Don’t use short open tags.

<?php is formal tag.

5. Use regular expressions only when you really need it.

When doing string operation, like replace part of string.
strtr is the fastest.

str_replace is faster.

preg_replace is slow.

Continue reading “Another Ten PHP Optimization Tips”

Google Chart API

Google introduced it Chart API last December.
For reference, I noted here my tips.
I need a 3D Pie chart. The code should looks like below:

<img src=”https://chart.apis.google.com/chart?cht=p3&chd=t:50,10,40&chs=500×200&chl=PR|HTTP Status|Whois”/>


The code can break down as shown here:
“cht=p3” is the chart type, in this case, a 3D pie chart.
“chd=t:50,10,40” are the chart values, text-encoded, and separated by a comma.
The number should be ranged from 0 to 100.
“chs=500×200” is the custom chart size, 500 by 200 pixels.
“chl=PR|HTTP Status|Whois” are the different labels for the pie chart sections, separated via the pipe character. Chinese is not supported by Chart API.
chart types include: line charts, bar charts, pie charts, Venn diagrams & scatterplots.

jQuery category created

From today, I will start to learn jQuery framework. I compared the popular five Ajax toolkits, including jQuery. Now I choose jQuery as my Ajax toolkit.
I will build a Inout Board system by PHP, MySql and jQuery. To replace current Pentacle InOut Board based on the ASP and Access.
There is category, Ajax, in this blog. I changed it to jQuery to focus on the jQuery only.
OK, I will put some notes or tips of jQuery into David Yin’s Blog – jQuery.

  • Archives