Category Archives: technology
Forget wifi network in windows 10
Click on the wireless icon on bottom right corner
Click on Manage WiFi Settings at bottom of wireless network list
Click on any network and click forget
How to use 2 numbers for whatsapp
I have 2 numbers and both are using whatsapp. The problem with this is I have to carry 2 devices (smart phones) every where I go.
There are solutions to this by root your device and install some app that can cater for 2 numbers. But the solution is not that practical.
What I do is to use web.whatsapp.com to open both numbers. One is opened in Google Chrome. Another one is set to be opened in Firefox browser.
So when I’m working on my notebook (most of the time), it is very easy for me to check both whatsapp messages for both numbers.
Lost your android device? Locate, reset or erase data via web
You can locate your android device if it is lost/misplaced.
Just point your browser to https://www.google.com/android/devicemanager.
Log in using your play store email and password and you can locate your phone (if the gps location is turned on). You can also ring, reset or erase data of your phone here.
Google spreadsheet – function to split comma separated string to few lines
Face this problem to split address to few lines for printing purpose.
Example address:
No. 1 Road 2, Happy Park, 43800 Big Town, My State
to
No. 1 Road 2,
Happy Park,
43800 Big Town,
My State
Just use this function besides the cell.
=SUBSTITUTE(A1, ",", char(10))
Replace A1 with the cell number.
Another related function is SPLIT.
Setting up Gmail to receive and reply email from other email
Steps to set up
- to receive email from x email in gmail (forward)
- reply from gmail using that x email address
A. Setting up the forwarding (example below is from another gmail. If from other emails may be differeent. e.g. from zoho mail)
- Go to Settings > Forwarding and POP/IMAP
- Click on “Add a forwarding address”
- Complete the process
B. Setting up to reply via gmail
- Add account
- Settings > Accounts
- Click on “Add another email address you own”
- Fill up the forms
- Verify the email address by clicking on the link sent
DigitalOcean – Notes
This is my notes on digital ocean.
Click here to register with DigitalOcean and get free USD10 to start using the service.
I used to install Ubuntu 14.04 with LAMP on it. With this also get SFTP ready.
Manage users and groups
Change root password. If logged in as root
- passwd
Add new user
- adduser is perl script to simplify original useradd function
- command – adduser username_here
- just answer all questions asked
- This add user function will …
- Create the user named username.
- Create the user’s home directory (default is /home/username and copy the files from /etc/skel into it.
- Create a group with the same name as the user and place the user in it.
- Prompt for a password for the user.
- Prompt for additional information on the user.
- allow user for sudo mode (optional) – usermod -a -G sudo <your username>
- add user to group – adduser username groupname
- more on adduser
- and more
Manage groups for user
- list group – cat /etc/group
- add user to group – adduser usrname groupname
Manage services
Connect to server via SSH, in terminal type the following:
- ssh username@yourdomain_or_ip
To get default MySQL root password, write this in terminal. Remove the file once done change the MySQL root password.
- cat /etc/motd.tail
To enter mysql console
- mysql -u root -p
Secure MySQL server. Run following command and answer all the questions.
- mysql_secure_installation
To change MySQL root password:
- mysqladmin -u root -p’oldpassword’ password newpass
To only allow certain IP to access directly to database
- edit file /etc/mysql/my.cnf
- comment line with IP 127.0.0.1
- restart service – service mysql restart
- enter following command in mysql command line
- type mysql -u root -p
- enter password when asked
- mysql> GRANT ALL ON database_name.* TO user@xx.xxx.xx.xx IDENTIFIED BY ‘your_password’;
- xx.xxx.xx.xx is the remote IP to access the server
Enable .htaccess (mod rewrite)
- enable mod rewrite – sudo a2enmod rewrite
- update file /etc/apache2/apache2.conf
- change Override none to Override all for web root directory
- restart service
To restart services (can also use stop and start)
- service mysql restart
- service apache2 restart
Install sendmail service (used by PHP mail function)
- apt-get install sendmail
- Run the sendmail config and answer ‘Y’ to everything: sendmailconfig
Server general settings
Change permission for directory (especially for ‘upload’ directory)
- chmod 755 /path/directorypath
Change the timezone. By default using US time zone
- sudo dpkg-reconfigure tzdata
- follow instruction on screen
- check if the date is correct by typing – date
To turn off server
- sudo shutdown -h now
- OR
- sudo poweroff
Check for disk utilization
- to check for disk utilization
- df -h
- to check for huge files location
- sudo du -a / | sort -n -r | head -n 10
- check for huge file (another option)
-
find / -size +50M -ls
-
Securing the server
To update/upgrade OS
- aptitude update
- aptitude upgrade
Disable root login on SSH
- edit /etc/ssh/sshd_config
- set PermitRootLogin no
- restart ssh – service ssh restart
Block IP’s from accessing certain services
- list – iptables -L
- DO tutorial on Iptables
Other measures:
- Disallow access to server via root username
- Disallow access directly to database from outside
- Close all unused ports. Left only web, SFTP, MySQL, SSH
- auto patch?
To explore
- using VPN
- using SSH key
- creating ftp user to access only certain directory
- virtual host (multiple domains for a server)
- security for 777 chmod directory
- change ssh port to different port (but still below 1024)
- install fail2ban to protect against brute force attack
Additional tools
- Ansible.com
- Docker.com
Other reading and references
Editors
vi, vim, nano
Click here to register with DigitalOcean and get free USD10 to start using the service.
List of payment gateway
Below are the list. Haven’t had time to review in details. Some for Malaysia, some other from outside but used by many countries including Malaysia.
Old players
- ipay88.com
- molpay.com
- paypal.com (outside) – 3.9% + rm2 per transaction
- 2checkout (outside)
- senangpay.my – rm300/yr subscription, 2.5% for credit card, 1.5% for FPX
- billplz.com – free registration, rm1.50 per transaction. no credit card
- jompay.com.my (by BNM subsidiary)
Problem with Chromecast connecting to D-link 615 Router
This has been a long-dragging problem for me. As for record, here I list all possible solutions suggested by people from various sources
- change wireless settings to
- single mode N only,
- WPA2 only,
- AES (instead of TKIP) only
- flash rom with DDWRT (haven’t tried, please be careful with this)
- anyway, a comment from a forum: Flashing DDWRT isn’t too hard, just download a file and upload via the web interface. Just make sure you get the right file and read the instructions a few times all the way through before you attempt it
- extra reading DDWRT on lifehacker
- comment from forum also: is it pretty much: hard reset, upload factory firmware, hard reset, upload current firmware? That’s pretty much it. It’s actually only 15mins work
- list of routers that can install DDWRT. Seems that mine can’t – D-Link G2
- purchase a new router that is proven compatible with chromecast (especially in your country/area). For example Asus RT-AC68U, TP-LINK TL-WR1043ND
Wireless settings can be found at
- Setup (top bar) > wireless setup (left bar) > manual wireless connection set up
- Advanced (top bar) > advanced wireless (left bar)
- IP for router normally http://192.168.0.1 (or http://192.168.1.1)
- Username: admin. Password: (just leave empty)
Other sources
- Chromecast compatible router list (D-link 615 firmware version 5.1 listed there. My version is G2 firmeware version 7.19)
- Forum 1
- Forum 2 – DDWRT solution
Update: My solution as at 2015-12-21:
Purchased a HDMI cable extension M and F ends 1.5 meters. Make the chromecast device out from back of the TV to get stronger wireless signal. Solved.
Cloud hosting
There are more cloud hosting offered by big boys. Normally they themselves use a lot of resources just to host their own applications. And we can also ride on latest and fastest technology they have to host ours as well.
- Google – free USD300 for first 6 months on trial
- Amazon
- Microsoft Azure – free USD200 for 1 month trial
- Alibabacloud – free USD300 for trial
Cheaper alternatives for cloud VPS
- Vultr.com – starts from USD2.50/mo
- Digitalocean – starts from USD5/mo
- Linode – starts with USD5/mo
- Heroku (PaaS)