Thursday 29 December 2016

Garage door opens by itself Stanley Deluxe 860 garage door opener open/close limit adjustment

Garage door opens by itself, the most common cause is the close limit is adjusted too far,
so when the door hits the floor, the opener motor still thinks it does not close yet,
but only hits an object and triggers the auto reverse function of opener, so the door automatically opens again.
in some cases, the close limit is just a little far than it actually needs, the door is not automatically reverse immediately,
but when there is some external force like wind could trigger the auto reverse and it opens.
to fix:
find the two tuners at bottom of opener, one is black which is for close limit, the arrow direction is to increase,
for the problem of door opens itself, you need to decrease, so you turn the tuner opposite to arrow direction, a quarter of turn at a time, then try close the door,
if the door does not hit ground too heavily, and the chain and cable tension is even on both sides and not too tight, it is good.

Saturday 17 December 2016

How to contact Amazon customer service my favorite way

For Amazon.ca:
1. Login to your account. click Customer Service at bottom right corner.
2. CLick Contact us button.
3.Finish step 1,2 and 3, there will be Phone Email Chat buttons show up. Chat is my favorite, you can choose to send a copy of the chat to email when close.
For Amazon.com:
1. Login to your account. click Amazon Assistant at bottom right corner.
2. CLick Contact Us button.
3.Finish step 1,2 and 3, there will be Phone Email Chat buttons show up. Chat is my favorite, you can choose to send a copy of the chat to email when close.

Thursday 15 December 2016

How to light furnace pilot burner with Honeywell VR8200A control


INSTRUCTIONS TO THE HOMEOWNER—
FOR YOUR SAFETY READ BEFORE LIGHTING
WARNING
IF YOU DO NOT FOLLOW THE
WARNINGS BELOW AND THE
LIGHTING INSTRUCTIONS EXACTLY,
A FIRE OR EXPLOSION CAN
RESULT IN PROPERTY DAMAGE,
PERSONAL INJURY OR LOSS OF
LIFE.
1. Before lighting, smell all around the appliance
area for gas. It the appliance uses LP
(bottled) gas, also be sure to smell next to the
floor be-cause LP gas is heavier than air. If
you smell gas, immediately shut off the
manual valve in the gas piping to the appliance,
or ON LP, AT THE TANK. Do not try
to light any appliance. Do not touch any
electrical switch or use the phone. LEAVE
THE BUILDING and call your gas supplier.
If your gas supplier cannot be reached, call
the fire department.
2. Do not force the gas control knob on the
appliance. Use only your hand to push down
the reset button or turn the gas control knob.
Never use any tools. If the knob or reset
button will not operate by hand, replace the
control using a qualified service technician.
Force or attempted repair may result in fire or
explosion.
3. Replace the gas control if it has been flooded
with water. Call a qualified service technician.
4. If the red reset button stays depressed after
it is released, replace the gas control.
5. The gas control is a safety device. It must be
replaced in event of any physical damage
such as bent terminals, missing or broken
parts, stripped threads, or evidence of exposure
to heat.
IMPORTANT: Follow the operating instructions provided
by the manufacturer of your heating appliance.
The information below will be of assistance
in a typical control application, but the specific
controls used and the procedures outlined by the
manufacturer of your appliance may differ, requiring
special instructions.


TO LIGHT THE PILOT BURNER
STOP: Read the safety information above.
This appliance has a pilot burner which must be lit by
hand. If the pilot flame has gone out, follow these instructions
exactly:
1. Set thermostat to lowest setting and shut off electric
power to appliance.
2. Remove gas control access panel if provided on
your appliance.
3. Turn gas control knob (Fig. 3) clockwise to
OFF position.
4. Wait five minutes to allow any gas in the combustion
chamber to vent. If you then smell gas in the appliance
area or near the floor in an LP installation, immediately
shut off the manual valve in the gas piping to the
appliance or, WITH LP, SHUT OFF AT THE TANK.
Do not touch any electrical switch or use the phone.
LEAVE THE BUILDING and call your gas supplier. If
your gas supplier cannot be reached, call the fire department.
Failure to do so may result in fire or explosion.
5. If you do not smell gas, turn knob on gas control
counterclockwise to PILOT.
6. Push and hold down red reset button (Fig. 5) while
you light the pilot burner. Continue to hold down the
reset button for about one minute after the pilot is lit.
Release button; pilot should remain lit. If it goes out,
repeat steps 3-6. If the reset button does not pop up
when released, stop immediately and call your service
technician or gas supplier. If pilot will not remain lit
after several tries, turn gas control knob to OFF and
call your service technician or gas supplier.
7. When pilot remains lit, turn gas control knob counterclockwise
to ON.
8. Replace burner access panel.
9. Turn on power.
10. Set thermostat to desired temperature.
TO TURN OFF APPLIANCE
VACATION SHUTDOWN: Turn gas control knob clockwise
from ON to PILOT. Pilot will re-main lit,
ready for return to normal service without relighting.
COMPLETE SHUTDOWN: Turn gas control knob clockwise
to OFF. Both pilot and main burner are shut
off. The pilot must be manually relit when normal
burner operation is desired.

Saturday 5 November 2016

Friday 30 September 2016

The best free screenshot capture tool in Windows 10

ScreenshotCaptor is the best free screenshot capture tool in Windows 10 I found so far. official download: https://www.donationcoder.com/Software/Mouser/screenshotcaptor/

Friday 23 September 2016

Python get server external IP address

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("gmail.com",80))
print(s.getsockname()[0])
s.close()

Python SMTP sendmail no subject line

message = 'Subject: %s\n\n%s' % (SUBJECT, TEXT)
and then:

server = smtplib.SMTP(SERVER)
server.sendmail(FROM, TO, message)
server.quit()

Thursday 18 August 2016

What is a Sharing Economy

What is a 'Sharing Economy'
A sharing economy is an economic model in which individuals are able to borrow or rent assets owned by someone else.
The sharing economy model is most likely to be used when the price of a particular asset is high and the asset is not fully utilized all the time.
---from Investopedia

Sunday 17 July 2016

Cheap travel to Las Vegas + Grand Canyon one day tour


Cheap travel to Las Vegas and Grand Canyon tips
booked from expedia.ca, 5 nights hotel+round trip flights, 1087CAD. flight: WestJet, Hotel:WestGate. European plan.

Smith's grocery store Safeway quality and NoFrills price. 2540 S Maryland Pkwy, Las Vegas, NV 89109, United States
a really cheap and nice all you can eat buffet called China Star: 2590 S Maryland Pkwy, Las Vegas, NV 89104, United States, 3 people+tax_tips: 24 USD

In hotel
Local call one dollar for first 30 minutes, 10cents per minute after. We have installed csimplesip and configured freephoneline. Can call any north America number free, we used this booked grand canyon one day tour from wannar.com,company is called CHD, very qualified Chines guide, tips is 6/person, while usually is 8/person, including Hoover dam but not skywalk, 89usd/person. we add two skywalk ticket 30usd/person when we arrived. because the cash is cheaper than credit card or Paypal.

Wife's cellphone shows roaming but not working,called mobilicity, they asked us to top $10 to account wallet,then it works. 1 day tour requires a working cellphone.

It is T3 after exiting westjet in McCarran airport, take inter-terminal free shuttle to T1 and take bus 108 to most hotels. $2 single trip/person, you need to insert us bills one by one,no ticket for single trip.
Us flag still half-mast maybe for the Orlando gay bar shooting.
It's better choose hotels on Las Vegas blvd, usually one day tour can pick up guest from these hotels. Book one day tour from inside hotels are very expensive ,about double to online.
Hotel go green program $10 credit /day, meaning you call an internal number asking them not clean up your room you will get $10 credit/day, can be used in any store inside hotel. you need to call day by day.

$8 24hour all access pass can access all redidential buses, SDX(strip &downtown express),Duece(double level bus)- generally any commuting vehicle with RTC sign.
The strip means area along both sides of south Las Vegas Blvd, many big famous hotels.

Day 1: Arrived, in McCarran airport, take inter-terminal shuttle from terminal 3 to terminal 1, take bus 108 to hotel, check in, then find a kabob pizza store running by Indian close to hotel. Anything sold in stores inside the hotel is terribly expensive.
Day 2:
Breakfast McDonald's.
Because booking grand canyon needs a working cellphone,fixed roaming program by calling Mobilicity using my Nexus 7 csimplesip app configured with freephoneline.
Asked information about grand canyon tour from concierge desk in our hotel and another hotel, super expensive, booked a tour from a Chinese company online,half price from hotel,
they don't offer pickup from our hotel if booking next day, so we booked the day after next day.
Found a decent grocery store called smith's like Safeway, but price as Nofrills, bought a dozen bottled water,1.99, 2 bags breads, $4, lettuce, 2 bags cooked ham slices,$4,tomatos,
yellow peaches 0.98/lb,oranges, a 4 litre lemonade, $2.99, enough for 2-3 days.
Lunch: Self serve
Dinner: Use go green credit for two personal pizza inside hotel.
Day 3:
Breakfast,self serve.
Bought 3 24 hours all access passes,take SDX to strip.toured most hotels by walking.
Lunch:Found China star all you can eat buffet, $6.49+drink+tips+tax=$8/person, it is not inside any casino,just close to Smith's. We didn't order drink except water,
and it totaled $24.06 for 3,better than Oriental buffet.
Every bus stop stands a RTC police, with gun, sometimes even onboard.
Even you do not drive,GPS is useful and important when you take bus.

Wednesday 22 June 2016

SQLyog settings configuration disappeared missing

It happens sometimes when you forcefully shutdown computer.
Solution
If you don't find the sqlyog.ini it could be because it is stored in a hidden folder (user's 'AppData' folder) with Windows default setting.
It is/should be here (on Windows Vista or higher): {System_drive}:\Users\{user}\AppData\Roaming\SQLyog\sqlyog.ini.
To unhide the AppData folder go to control panel .. folder settings and check 'show hidden folders'.
However since SQLyog cannot display connections, the file is either not there or it is corrupted/unusable.
If you are using WIndows 7 or higher and have 'System Restore' turned on you may restore the complete folder C:\Users\Peter\AppData\Roaming\SQLyog.
Just navigate to it from Windows explorer, make a copy of the existing folder first just in case .., then right-click the folder, select 'properties',
go to 'previous vesions' tab and select a 'shadow copy' from before this happened for restore.
If you have a backup of the complete system or of your 'user profile' you may of course also restore from there.
As the sqlyog ini is user-specific it will not be found it you login to the system with another user account than what was used when it was created.

Tuesday 14 June 2016

Make windows 10 installation DVD

1. Download windows 10 official ISO file: https://www.microsoft.com/en-us/software-download/techbench
2. Download http://download.cnet.com/ImgBurn/3001-2646_4-10847481.html?hlndr=1 and install ImgBurn
3.Run ImgBurn, write Windows 10 ISO file to DVD
4. Boot with Windows 10 DVD and start installing...

Sunday 12 June 2016

Get windows 10 notification icon downloading for ever

Get windows 10 notification icon downloading for ever
Solution:
DO NOT use it.
go to https://www.microsoft.com/en-ca/windows/windows-10-upgrade
click "Download Now", run the app you downloaded, follow instructions.

Wednesday 8 June 2016

Windows 10 too slow system and compressed memory using too much disk bandwidth and memory

start --> Services, find service Superfetch, stop it, right click it > Properties, change Startup Type to Manual, save, reboot PC.
this is proved not working by me.

Saturday 28 May 2016

Have you ever seen windows 10 blue screen?

This is first time I saw windows 10 blue screen, but no death, not BSOD blue screen of death.

Cheap and reliable VPN service


VPN service price:
0.40CAD/day

10CAD/month

100CAD/year

400CAD/lifetime


simple and quick setup:

You need only:

1. Send me an email to apply

2. Download and install VPN client

3. From email I sent to you, put the certificate file, key file and configuration file in a folder and specify the folder in the configuration file

4. Launch VPN client, click Connect button, connected to VPN automatically

the above normally needs 5-10 minutes,and there is a guide in my email with pictures, I'll give you up to 7 days extra for you to set up and try.

You only need to provide your email to apply

Paypal: forerunner6 at gmail dot com
Contact: forerunner6 at gmail dot com
pay after try

Wednesday 25 May 2016

Convert video format quick free efficient in windows 10

click in search bar at bottom left corner, enter and search movie maker
launch movie maker
drag and drop the video file you want to convert to movie maker window
File -->Save movie, choose a new format

Monday 23 May 2016

Centos 7 squirrelmail Forbidden You don't have permission to access /webmail on this server.

I followed online articles to install postfix,dovecot and squirrelmail on Centos 7, but got error when accessing http://serverip/webmail:
Forbidden You don't have permission to access /webmail on this server.
in httpd error log: /var/log/httpd/error_log:
AH01630: client denied by server configuration: /usr/share/squirrelmail
after lots of Google search, this is due to httpd 2.4 access control has changed from previous version:
in /etc/httpd/conf/httpd.conf
Order allow,deny
Allow from all
should be replaced by:
Require all granted
then restart httpd:
#systemctl restart httpd
problem solved!
refer to: http://httpd.apache.org/docs/2.4/upgrading.html#access
Very useful tools to find out configuration errors of your email server:
postconf -n
doveconf -n

Friday 20 May 2016

outlook 2010 this file cannot be previewed because there is no previewer installed for it

the attachment files with .dat extension in outlook 2010 email can not be previewed, error: this file cannot be previewed because there is no previewer installed for it.
Solution:
In Windows Explorer right-click any .dat file and select "Open With..." -> Choose Default Program. Select Windows Notepad there (not Notepad++) and make sure that you have the "default" check set.
Restart Outlook. Now it has to show you .dat files.

Friday 22 April 2016

Transfer import port yahoo emails to gmail google email account


Step 1: Login to gmail
Step 2:
Step 3:
Step 4:
Following instructions
Finally, after a few hours:
after import, your original emails are still intact.
References:
Google troubleshooter: https://support.google.com/mail/answer/164640?hl=en&rd=1
Google gmail forum: https://productforums.google.com/forum/#!forum/gmail

A problem I encountered: for one yahoo account gmail said it's completed, but I can not find any imported emails.
that yahoo email account is for disposable, for junk email, there are about 70K pieces of emails, many has big attachment,
I cleaned up half of them, restarted the import in Gmail, then it's OK.

Thursday 21 April 2016

Install MariaDB Apache PHP LAMP in CentOS 7


1. Install mariadb (successor of MySQL)
# yum install mariadb mariadb-server -y

2. install Apache
# yum install httpd -y

3. install PHP
# yum install php php-mysql -y

4. Configure Apache
#systemctl start httpd.service
#systemctl enable httpd.service

5. Configure MariaDB:
# systemctl start mariadb
#mysql_secure_installation
all answer Y
#systemctl enable mariadb.service

6.Configure PHP:
#systemctl restart httpd.service
search PHP modules:
#yum search php-
get info of module:
#yum info package_name
install PHP modules:
#yum install package1 package2...

7. Test PHP
vi /var/www/html/info.php
put in file:
save file
open firewall:
# firewall-cmd --permanent --zone=public --add-service=http
# firewall-cmd --permanent --zone=public --add-service=https
# firewall-cmd --reload

in browser, input:
http://your_server_IP_address/info.php
after success: #rm /var/www/html/info.php
Next steps: install mail server: WebMail : Squirrelmail < Roundcube < Horde ; migrate code and data; install SSL; change DNS to new IP

Sunday 17 April 2016

iRulu U1PRO Android 4.4.2 KitKat root reflash flash stock ROM firmware

Background
My son complained to me recently that there are many virus/malware in his android phone. he did not browse much internet
except regularly check emails and daily websites, two popular games that many peer play, all downloaded from play store.
the symptom: once connect WiFi, it automatically download apps crazily. I tried to install an AV app but no room, had to do factory reset, but once connect WiFi, still the same issue.
the Android system could have been infected
after reset, I installed AVG and Avira, neither helped. installed Avira on PC, connect phone to PC, scanned it,
found and quarantined quite a few malware,issue still the same if connect to WiFi

push volume down+power simultaneously, check: my BB chip is MT6592
Before start, you need tools and drivers:

1. A PC with Windows
2. Your iRulu U1PRO and USB cable
3. Download stock firmware from official website: https://www.irulu.com/download/lists.html, extract it to a folder in PC, let's call folder name stockrom
4. iroot, download from http://www.iroot.com/
5. SP Flash tool from http://spflashtool.com/
6. ADB driver, download from http://www.chinaphonearena.com/forum/Thread-OnePlus-X-guide-auto-install-adb-drivers-fastboot-and-adb-Windows-xp-7-8-10
7. MTK Droid Tool, download: https://androidmtk.com/download-mtk-droid-tool
8. TWRP 2.8.1.0, download: http://www.mediafire.com/download/7ezmib9qr7yyqsk/2.8.1.0.zip
9. MediaTek USB VCOM drivers download: http://spflashtool.com/download/MediaTek_USB_VCOM_drivers.zip

You need to do: Warning: these actions will void warranty on your phone and it only applies to my specific phone model,you assume responsibility for any and all damages caused by following these steps

1.Enable USB debugging mode of your phone in settings > developer options, if you do not see the option: Settings > About phone, tap build number 7 times
2.Root the phone,no guarantee every tool can work, I used iRoot which worked.
3.Back up the phone in case reflash rom fails.install TWRP for MTK, backup the phone whole system with TWRP,
http://www.gizbeat.com/5786/how-to-make-create-twrp-mt6592-mt6582-mt6572-mt6589-mt6595/
Backup with MTK Droid Tool might also work, but I did not try. TWRP backup looks easier to me
4.Backup IMEI and NVRAM, https://androidmtk.com/backup-and-restore-imei-nvram
5.MEDIATEK USB VCOM DRIVERS MANUAL INSTALLATION, https://www.youtube.com/watch?v=sADkzyI8Z5Q
6.Flash the firmware to your phone by SP Flash tool: https://androidmtk.com/flash-stock-rom-using-smart-phone-flash-tool
in step 2 of this link, you remove battery then you can put back.during flashing, I got error:"PMT changed for the ROM; it must be downloaded.", in the SP Flash tool, I choose foramt all+Download, then success, but you need restore IMEI and NVRAM: https://androidmtk.com/backup-and-restore-imei-nvram ,otherwise it can't recognize IMEI/SIM card

Friday 8 April 2016

Connection unexpectedly closed

suspect firewall settings along your route first, in this case the antispam firewall setting discarded the email, closed the connection and it's not sent: File "/usr/lib64/python2.7/smtplib.py", line 367, in getreply raise SMTPServerDisconnected("Connection unexpectedly closed") SMTPServerDisconnected: Connection unexpectedly closed

Saturday 12 March 2016

How to report self-employment income in studio tax

Open studiotax, go to T1 page 2, double click number field of line 135, check mark one T2125, fill in T2125
Double click the green color number of line 1 in section "Business income"

Monday 7 March 2016

Do not pay lottery ticket with credit card

Because it is deemed cash advance and credit card company will charge a transaction fee

Wednesday 2 March 2016

how to report professional certification fee tax return Canada

if the certification/licence/membership fee dues are a must to keep your professional job, report it on line 21200 (in StudioTax double click the field and enter to other dues)
http://www.cra-arc.gc.ca/E/pub/tp/it158r2/it158r2-e.html

Saturday 6 February 2016

Free alternatives to NetFlix

TUBI TV

The ad-supported, free streaming service is funded in part by Hollywood studios Lionsgate, MGM and Paramount Pictures.

You can watch online or on streaming media players such as Amazon Fire TV, Roku, your Xbox video game console and other devices, TUBI TV has 40,000 free streaming TV shows and movies.

You can sign in using your Facebook credentials but it's not required to watch.

Plus if you don't mind watching most content older than a year or two.

From the BROWSE menu besides the website logo, you can find TV dramas and comedies, kids' shows, trending movies, the best of British TV,
documentaries, action-thriller movies and others. One category you won't find on Netflix or Hulu is Tubi TV's "Not on Netflix" category,
with movies and TV shows.

Check Tubi TV from time to time. it'll continue to expand its library of free streaming content.

Another alternative? No internet, no cable, no satellite? No problem, check this:
Super Thin Amplified HDTV Antenna 50 Miles Range with Detachable Amplifier Booster USB Power Supply to Boost Signal and 20ft Coaxial Cable
FREE FOR LIFE - Never Pay Your Cable or Satellite For Television Again! the antenna can pull in all of your local news, weather, sitcoms,
kids and sports programs absolutely FREE. Just connect it to your television and let the antenna do all the work.

DETACHABLE AMPLIFIER - If you can not get the weak signals from far away towers, use this amplifier to boost the signals. Remove the
amplifier if you get fewer channels. A booster will cause self-oscillate and you may get fewer signals than without.

FULL HD - 50 miles range to access from broadcast tower. It delivers full 1080p HD to any digital-ready TV.

LONGER CABLE - Comes with a 20-foot coaxial cable for greater flexibility. Makes it easier for you to place it in your house to get the best
reception, especially for customers whose televisions are quite far away from windows.

Friday 29 January 2016

Cent OS 7 svn client svn: E120104: ra_serf: An error occurred during decompression


Solution:
cd ~/.subversion
vi servers, add line: http-library = neon

Add C C++ developer tools to Eclipse Mars for Java EE


Google "add cdt to eclipse mars", found: https://eclipse.org/cdt/downloads.php,
Eclipse > Help > Install New Software... > work with: http://download.eclipse.org/tools/cdt/releases/8.8, follow instructions

Configure Web Proxy on CentOS 7 configuration


System-wide proxy settings - add the following lines to your /etc/environment file:
# vi /etc/environment
http_proxy="http://proxysrv:8080/"
https_proxy="https://proxysrv:8080/"
ftp_proxy="ftp://proxysrv:8080/"
no_proxy=".mylan.local,.domain1.com,host1,host2"

Configure yum to use proxy:
# vi /etc/yum.conf
proxy=http://proxysrv:8080/

Monday 25 January 2016

OSCLASS plugins like Google Map, social bookmarks facebook twitter, youtube does not show with HTTPS SSL


After you set up secure web server using https for your website you might find the plugins like Google Map, social bookmarks facebook twitter, youtube does not show with HTTPS,
Solution:
go to corresponding folders under oc-content/plugins, grep http *, edit the found files, replace http with https

Sunday 24 January 2016

How to check trusted root CA list in Google Chrome web browser

Settings > (bottom of page) Show advanced settings... > (section HTTPS/SSL) "Manage certificates..." button > "Trusted Root Certification Authorities" tab

Saturday 23 January 2016

Insert an iptables rule before a specific line number with a comment, and restore all rules after reboot


# First get the iptables list with the line numbers enabled
$ iptables -nL --line-numbers

# Look up the line number you want to use (the exisitng rule will shift down) and insert your rule
$ iptables -I INPUT {LINE_NUMBER} -p tcp --dport 2121 -s 123.123.123.123 -j ACCEPT -m comment --comment "important information"

$service iptables save
$iptables -L -v

Add secure SSL certificate https to website


For an SSL encrypted web server install the required software
yum install mod_ssl openssl


Got a free SSL certificate from startssl.com:
First, sign up with an email, after verification code verified, a client certificate will be installed on your PC, you will use it to login going forward.
after you login, choose the free certificate, verify your domain(similar steps as when you sign up), after your domain verified,
you need to download startcomtool.exe from its web page, use the tool to generate a CSR, choose method OpenSSL, copy CSR from the tool, paste into the form
after your domain verified in startssl.com, then click generate, after a few minutes, the certificates generated and you can download the certificates,
then upload to your web server, configure web server to point to it.

Update the Apache SSL configuration file

vi /etc/httpd/conf.d/ssl.conf
Change the paths to match where the Key file is stored. for example:

SSLCertificateFile /etc/pki/tls/certs/ca.crt

SSLCertificateKeyFile /etc/pki/tls/private/ca.key

Quit and save the file and then restart Apache

/etc/init.d/httpd restart

Setting up the virtual hosts in /etc/httpd/conf.d/ssl.conf
  <VirtualHost *:80>  
    <Directory /var/www/vhosts/yoursite.com/httpdocs>  
     AllowOverride All  
     </Directory>  
     DocumentRoot /var/www/vhosts/yoursite.com/httpdocs  
     ServerName yoursite.com  
  </VirtualHost>  


To add a sister site on port 443 you need to add the following at the top of your file

NameVirtualHost *:443

and then a VirtualHost record something like this:
  <VirtualHost *:443>  
     SSLEngine on  
     SSLCertificateFile /etc/pki/tls/certs/ca.crt  
     SSLCertificateKeyFile /etc/pki/tls/private/ca.key  
     <Directory /var/www/vhosts/yoursite.com/httpsdocs>  
     AllowOverride All  
     </Directory>  
     DocumentRoot /var/www/vhosts/yoursite.com/httpsdocs  
     ServerName yoursite.com  
 </VirtualHost>  


Restart Apache again using
service httpd restart

Configuring the firewall

open port 443

iptables -A INPUT -p tcp --dport 443 -j ACCEPT
service iptables save
iptables -L -v
Configure HTTPS everywhere
in /etc/httpd/conf/httpd.conf add always redirect to https
 <VirtualHost *:80>  
   ServerAdmin webmaster@craplist.ca  
   ServerName craplist.ca  
   Redirect permanent / https://craplist.ca/  
 </VirtualHost>  


in config.php:
define('WEB_PATH', 'https://craplist.ca/');

Wednesday 20 January 2016

Adobe Reader XI content preparation progress turn off

1. Go to Edit > Preferences > Reading.
2. Under "Screen Reader Options" select "Only read the currently visible pages".
3. Restart Adobe reader.

Monday 18 January 2016

Change default ssh port and turn on firewall on CentOS 7


[root@localhost ~]# cd /etc/ssh
[root@localhost ssh]# ll
total 268
-rw-------. 1 root root 242153 Jun 9 2014 moduli
-rw-r--r--. 1 root root 2123 Jun 9 2014 ssh_config
-rw-------. 1 root root 4442 Jun 9 2014 sshd_config
-rw-r-----. 1 root ssh_keys 227 Jul 27 2014 ssh_host_ecdsa_key
-rw-r--r--. 1 root root 162 Jul 27 2014 ssh_host_ecdsa_key.pub
-rw-r-----. 1 root ssh_keys 1679 Jul 27 2014 ssh_host_rsa_key
-rw-r--r--. 1 root root 382 Jul 27 2014 ssh_host_rsa_key.pub
[root@localhost ssh]# cp sshd_config sshd_config.b2016Jan18
[root@localhost ssh]# vi sshd_config # uncomment line Port 22, change to Port 1234
[root@localhost ssh]# semanage port -a -t ssh_port_t -p tcp 1234
-bash: semanage: command not found
[root@localhost ssh]# getenforce
Enforcing
[root@localhost ssh]# yum -y install policycoreutils-python
Loaded plugins: fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
(1/4): extras/7/x86_64/primary_db | 90 kB 00:15
(2/4): base/7/x86_64/group_gz | 155 kB 00:16
(3/4): updates/7/x86_64/primary_db | 1.7 MB 00:19
(4/4): base/7/x86_64/primary_db | 5.3 MB 00:25
Determining fastest mirrors
* base: centos.mirror.iweb.ca
* extras: centos.mirror.iweb.ca
* updates: centos.mirrors.atwab.net
Resolving Dependencies
--> Running transaction check
---> Package policycoreutils-python.x86_64 0:2.2.5-20.el7 will be installed
--> Processing Dependency: policycoreutils = 2.2.5-20.el7 for package: policycor eutils-python-2.2.5-20.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.1.10-1 for package: policycor eutils-python-2.2.5-20.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreu tils-python-2.2.5-20.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.2.5- 20.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycore utils-python-2.2.5-20.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycore utils-python-2.2.5-20.el7.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.2.5-2 0.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycore utils-python-2.2.5-20.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.2.5 -20.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-py thon-2.2.5-20.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-py thon-2.2.5-20.el7.x86_64
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.4.1-5.el7 will be installed
--> Processing Dependency: audit-libs = 2.4.1-5.el7 for package: audit-libs-pyth on-2.4.1-5.el7.x86_64
---> Package checkpolicy.x86_64 0:2.1.12-6.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-8.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.1.10-18.el7 will be installed
--> Processing Dependency: libsemanage = 2.1.10-18.el7 for package: libsemanage- python-2.1.10-18.el7.x86_64
---> Package policycoreutils.x86_64 0:2.2.5-11.el7 will be updated
---> Package policycoreutils.x86_64 0:2.2.5-20.el7 will be an update
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.7-46.el7 will be installed
--> Running transaction check
---> Package audit-libs.x86_64 0:2.3.3-4.el7 will be updated
--> Processing Dependency: audit-libs = 2.3.3-4.el7 for package: audit-2.3.3-4.e l7.x86_64
---> Package audit-libs.x86_64 0:2.4.1-5.el7 will be an update
---> Package libsemanage.x86_64 0:2.1.10-16.el7 will be updated
---> Package libsemanage.x86_64 0:2.1.10-18.el7 will be an update
--> Running transaction check
---> Package audit.x86_64 0:2.3.3-4.el7 will be updated
---> Package audit.x86_64 0:2.4.1-5.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
policycoreutils-python x86_64 2.2.5-20.el7 base 435 k
Installing for dependencies:
audit-libs-python x86_64 2.4.1-5.el7 base 69 k
checkpolicy x86_64 2.1.12-6.el7 base 247 k
libcgroup x86_64 0.41-8.el7 base 64 k
libsemanage-python x86_64 2.1.10-18.el7 base 94 k
python-IPy noarch 0.75-6.el7 base 32 k
setools-libs x86_64 3.3.7-46.el7 base 485 k
Updating for dependencies:
audit x86_64 2.4.1-5.el7 base 234 k
audit-libs x86_64 2.4.1-5.el7 base 80 k
libsemanage x86_64 2.1.10-18.el7 base 123 k
policycoreutils x86_64 2.2.5-20.el7 base 803 k

Transaction Summary
================================================================================
Install 1 Package (+6 Dependent packages)
Upgrade ( 4 Dependent packages)

Total download size: 2.6 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/11): audit-libs-python-2.4.1-5.el7.x86_64.rpm | 69 kB 00:09
(2/11): checkpolicy-2.1.12-6.el7.x86_64.rpm | 247 kB 00:09
(3/11): libcgroup-0.41-8.el7.x86_64.rpm | 64 kB 00:09
(4/11): audit-libs-2.4.1-5.el7.x86_64.rpm | 80 kB 00:09
(5/11): libsemanage-python-2.1.10-18.el7.x86_64.rpm | 94 kB 00:00
(6/11): libsemanage-2.1.10-18.el7.x86_64.rpm | 123 kB 00:00
(7/11): python-IPy-0.75-6.el7.noarch.rpm | 32 kB 00:00
(8/11): audit-2.4.1-5.el7.x86_64.rpm | 234 kB 00:09
(9/11): setools-libs-3.3.7-46.el7.x86_64.rpm | 485 kB 00:00
(10/11): policycoreutils-2.2.5-20.el7.x86_64.rpm | 803 kB 00:00
(11/11): policycoreutils-python-2.2.5-20.el7.x86_64.rpm | 435 kB 00:00
--------------------------------------------------------------------------------
Total 255 kB/s | 2.6 MB 00:10
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : audit-libs-2.4.1-5.el7.x86_64 1/15
Updating : libsemanage-2.1.10-18.el7.x86_64 2/15
Updating : policycoreutils-2.2.5-20.el7.x86_64 3/15
Installing : libsemanage-python-2.1.10-18.el7.x86_64 4/15
Installing : audit-libs-python-2.4.1-5.el7.x86_64 5/15
Installing : python-IPy-0.75-6.el7.noarch 6/15
Installing : checkpolicy-2.1.12-6.el7.x86_64 7/15
Installing : libcgroup-0.41-8.el7.x86_64 8/15
Installing : setools-libs-3.3.7-46.el7.x86_64 9/15
Installing : policycoreutils-python-2.2.5-20.el7.x86_64 10/15
Updating : audit-2.4.1-5.el7.x86_64 11/15
Cleanup : policycoreutils-2.2.5-11.el7.x86_64 12/15
Cleanup : libsemanage-2.1.10-16.el7.x86_64 13/15
Cleanup : audit-2.3.3-4.el7.x86_64 14/15
Cleanup : audit-libs-2.3.3-4.el7.x86_64 15/15
Verifying : setools-libs-3.3.7-46.el7.x86_64 1/15
Verifying : libsemanage-2.1.10-18.el7.x86_64 2/15
Verifying : libcgroup-0.41-8.el7.x86_64 3/15
Verifying : checkpolicy-2.1.12-6.el7.x86_64 4/15
Verifying : policycoreutils-2.2.5-20.el7.x86_64 5/15
Verifying : python-IPy-0.75-6.el7.noarch 6/15
Verifying : audit-libs-2.4.1-5.el7.x86_64 7/15
Verifying : libsemanage-python-2.1.10-18.el7.x86_64 8/15
Verifying : audit-2.4.1-5.el7.x86_64 9/15
Verifying : policycoreutils-python-2.2.5-20.el7.x86_64 10/15
Verifying : audit-libs-python-2.4.1-5.el7.x86_64 11/15
Verifying : policycoreutils-2.2.5-11.el7.x86_64 12/15
Verifying : audit-libs-2.3.3-4.el7.x86_64 13/15
Verifying : libsemanage-2.1.10-16.el7.x86_64 14/15
Verifying : audit-2.3.3-4.el7.x86_64 15/15

Installed:
policycoreutils-python.x86_64 0:2.2.5-20.el7

Dependency Installed:
audit-libs-python.x86_64 0:2.4.1-5.el7
checkpolicy.x86_64 0:2.1.12-6.el7
libcgroup.x86_64 0:0.41-8.el7
libsemanage-python.x86_64 0:2.1.10-18.el7
python-IPy.noarch 0:0.75-6.el7
setools-libs.x86_64 0:3.3.7-46.el7

Dependency Updated:
audit.x86_64 0:2.4.1-5.el7 audit-libs.x86_64 0:2.4.1-5.el7
libsemanage.x86_64 0:2.1.10-18.el7 policycoreutils.x86_64 0:2.2.5-20.el7

Complete!
[root@localhost ssh]# semanage port -a -t ssh_port_t -p tcp 1234
[root@localhost ssh]#
[root@localhost ssh]# firewall-cmd --permanent --zone=public --add-port=1234/tcp
FirewallD is not running
[root@localhost ssh]#
[root@localhost ssh]# systemctl enable firewalld
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
ln -s '/usr/lib/systemd/system/firewalld.service' '/etc/systemd/system/basic.target.wants/firewalld.service'
[root@localhost ssh]# systemctl start firewalld
[root@localhost ssh]# firewall-cmd --permanent --zone=public --add-port=1234/tcp
success
[root@localhost ssh]# firewall-cmd --reload
success
[root@localhost ssh]#
[root@localhost ssh]# systemctl restart sshd.service
[root@localhost ssh]#
[root@localhost ssh]#
[root@localhost ssh]#
[root@localhost ssh]# ss -tnlp | grep ssh
LISTEN 0 128 *:1234 *:* users:(("sshd",24327,3))
LISTEN 0 128 :::1234 :::* users:(("sshd",24327,4))
[root@localhost ssh]#

Thursday 14 January 2016

Windows 10 built-in hidden screen recording tool

windows key+G
check the 'Yes, this is a game' box
click the circle button to start recording

Friday 8 January 2016

Tip to make windows 7 run faster

My windows 7 gets very slow easily, when I right click task bar > Start Task Manager > Processes, I see a lot of Chrome.exe *32 processes meaning they are 32 bit applications,
I downloaded Chrome browser 64bit version from here: https://www.google.com/chrome/browser/beta.html, the performance improved a lot, I can not feel the latency/slowness any more.

Search