@aBoyDesign.com Lab Launched!

Web Development is something I've been doing in my spare time for my family and friends. They are usually a bunch of small projects like log-in systems or light-weight shopping cart, etc... These features are so small that I can't usually use them as my portfolios. For this purpose, I've created @aBoyDesign Lab.

@aBoyDesign Lab has a collection of projects that I created for fun and it's launched now!

Any comments are much appreciated!

That's all!
-gibb

Getting git working on Galaxy Note 4

Yes! I finally received Samsung Galaxy Note 4 - Frost White on 11/3/2014, a little more than week later than proposed shipping date from Verizon. Galaxy Note 4 is an amazing, amazing device. It's super fast and its display is just gorgeous. There are so much to say about this phone but for full reviews and specs, you can always "Google It".

At any rate, after a few days of playing with it, naturally, I decided to make it my web development device in place of old Thunderbolt. So, I started following my own blog, Getting git Working on Android Device. But when I tried to make a test connection to bitbucket.org, I got following error: $ ssh -T git@bitbucket.org ssh: connection to git@bitbucket.org:22 No auth methods could be used.

Hmm... what's going on? I started digging and found that I forgot to mention registering the public key to bitbucket.org. Oops. After a year of its original post, I found a missing step in my post. How embarrassing! I made a correction so hopefully all make sense now.

Since I have all the steps and explanation in Getting git Working on Android Device, I won't go into details of each step again, but instead, I'll list the summary of commands used to make it happen: //OPEN Terminal IDE $ git --version git version 1.7.8.163.g9859a.dirty $ mkdir ~/.ssh $ dropbearkey -t rsa -f ~/.ssh/id_rsa $ dropbearkey -y -f ~/.ssh/id_rsa $ vim ~/.bashrc --------------------------------- alias ssh='ssh -i ~/.ssh/id_rsa' $ vim /data/data/com.spartacusrex.spartacuside/files/bin/ssh_git --------------------------------- #!/data/data/com.spartacusrex.spartacuside/files/system/bin/bash exec ssh -i ~/.ssh/id_rsa "$@" $ chmod 755 /data/data/com.spartacusrex.spartacuside/files/bin/ssh_git $ vim ~/.bashrc --------------------------------- export GIT_SSH=~/bin/ssh_git $ dropbearkey -y -f ~/.ssh/id_rsa | grep "^ssh-rsa" > ssh_key //COPY THE PUBLIC KEY TO bitbucket.org and Restart Terminal IDE $ ssh -T git@bigbucket.org logged in as [username]. You can use git or hg to connect to Bitbucket. Shell access is disabled. $ ln -s /mnt/sdcard/www www && cd www $ git clone git@bitbucket.org:[username]/[repository_name].git $ vim ~/.bashrc --------------------------------- export GIT_AUTHOR_NAME="[username]" export GIT_AUTHOR_EMAIL="[username]@[server]" export GIT_COMMITTER_NAME=$GIT_AUTHOR_NAME export GIT_COMMITTER_EMAIL=$GIT_AUTHOR_EMAIL

That's all!
-gibb

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others. I will NOT take any responsibilities of end result after following these steps (although I will try to help if you send me your questions/problems).

Adding Another Wirelesss Router Along with Verizon (FIOS) Actiontec Router

I admit. I didn't care much about WiFi signal strength or range for my cellphone because I had the unlimited data plan from Verizon. But my way of thinking now needs to be changed as my old HTC thunderbolt started acting up to the point where I could no longer tolerate (it sometimes takes 15 mins to start making a call after inputting numbers, on-screen keyboard doesn't input anything, etc...). So finally I decided to upgrade my device and plan.

As I started using WiFi at home, I realized the WiFi signal didn't cover all the rooms and somehow I needed to extend the signal range. The best way would be to relocate my current Actiontec router from Verizon somewhere center of the house but this was not an option for me. Another way was to use another wireless router as AP (Access Point) along with Actiontec router. Luckily, I still had ASUS Wireless router (RT-N56U) that I used to use before FIOS and used it to extend the WiFi signal range.

Here is the steps that I took to configure the primary router (Actiontec) and secondary router (ASUS).

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others. I will NOT take any responsibilities of end result after following these steps (although I will try to help if you send me your questions/problems).

Configuring the Primary Router (Actiontec)

1) First thing first, disconnect all patch cables connected to the primary router except the one system used to configure it. This step involves changing DHCP address range, so it's better to turn off any devices using wireless connection and reset the primary router to start off with clean state.

2) Access the configuration page of the primary router from web browser pointing to http://192.168.1.1.

3) Once successfully logged in, go to My NetworkNetwork ConnectionNetwork (Home/Office) then click on the Settings button. Scroll down a bit and locate IP Address Distribution.

IP Address Distribution: DHCP Server
Start IP Address: 192.168.1.6
End IP Address: 192.168.1.254
Subnet Mask: 255.255.255.0

Actiontech_DHCP

The starting IP address I used was 6. This is because address 1 is reserved for the IP address for the primary router. Address 2 is for the secondary router and I have some other devices that I wanted to use static IP address (ex: my primary system, printer, etc...).

4) Click Apply, then click Apply again.

5) Now set up the static IP address for the secondary router, my primary system and printer. Go to Advanced → Click on YesIP Address DistributionConnection ListNew Static Connection

Make sure the physical address (MAC address) is available for each system configuring for static IP address

6) Make sure that the system still has the Internet connection.

Configuring the Secondary Router (ASUS)

7) Unplug the patch cable from the primary router and plug it in the LAN port of the secondary router. Then restart networking. I used my notebook with Debian and below is the commands: # /etc/init.d/networking stop # /etc/init.d/networking start

8) Again, access the configuration page of the secondary router from web browser pointing to http://192.168.1.1.

9) Now configure this secondary router as Access Point (AP). There are two ways to do this:

i. Setting Up AP Mode: I updated its firmware to 3.0.0.4.376_1665 and AP mode became available.

Go to Administration and make sure Access Point(AP) mode is selected.

ASUS_AP1

Set up static IP address for this router.

IP Address: 192.168.1.2
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

ASUS_AP2

Then set up wireless, such as SSID, Network Key, etc...

ii. Setting Up Manually: Manual setting is not difficult. All you need to do is to setup the static IP address and disable DHCP.

Set up the static IP address for the secondary router. Go to LAN under the Advanced Settings → LAN IP

IP Address: 192.168.1.2
Subnet Mask: 255.255.255.0

ASUS_MAN1

Now disable DHCP. Go to LANDHCP Server and make sure Enable the DHCP Server is set to No

ASUS_MAN2

Let's Connect Two Routers

10) Connect a patch cable from a LAN port on the primary router to a LAN port on the secondary router. At this point, I can connect to the configuration page of the primary router via http://192.168.1.1 and that of the secondary router via http://192.168.1.2.

That's all!
-gibb

Debian Wheezy (7.5): Changing Default X Session

I mainly use Openbox. But after Debian Wheezy installation, X Window System defaulted to LXDE. It's not that much of a hassle to select Openbox from the drop-down menu every time I log on:

Debian_LoginBox

However, sometimes I forget to select Openbox, get LXDE, and re-log in with Openbox. This happened quite a few times and I finally decided to change its default X session to Openbox.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others. I will NOT take any responsibilities of end result after following these steps (although I will try to help if you send me your questions/problems).

There are quite a few ways to do this. One way is to edit (or create if it doesn't exist) ~/.xsession or ~/.Xsession.

But I used the update-alternatives command: $ update-alternatives --config x-session-manager

Debian_update-alternatives

As shown in above image, select number 2 for Openbox. After logging out, Openbox becomes the default X Window Session!

That's all!
-gibb

Debian Wheezy (7.5): Name-Based Web Sites on a Single IP Address (vhosts)

Configuring virtual hosting with Debian Wheezy has a little different steps from that with Slackware. To avoid from getting myself confused (and hopefully help someone else to set their virtual host sites), these are the steps I used for my local sites.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others. I will NOT take any responsibility of end result after following these steps (although I will try to help if you send me your questions/problems).

1) Disabling Default Virtual Host

First, let's disable the default Apache virtual host with a2dissite. What this command do is simply removing a symlink to /etc/apache2/sites-enabled/. # a2dissite default

2) Creating a New Directory and Setting Permissions

It's necessary to create a directory where site's website files and logs reside and grant ownership of the directory to the user instead of keeping it on the root system. For example, I'm setting up for siteA.org and siteB.org.

siteA.org
# mkdir -p /var/www/siteA.org/public_html # mkdir /var/www/siteA.org/logs # chown -R [$user]:[$group] /var/www/siteA.org/public_html
siteB.org
# mkdir -p /var/www/siteB/public_html # mkdir /var/www/siteB.org/logs # chown -R [$user]:[$group] /var/www/siteB.org/public_html

3) Creating Config files

Each virtual host needs own configuration file placed in /etc/apache2/sites-available/ directory. Each configuration file is as follow. Make sure that you have all directories specified in each conf file exist before you restart the apache process; otherwise, it'll fail to start.

siteA.org

# vim /etc/apache2/sites-available/siteA.org.conf ------------------------------------ <VirtualHost *:80> ServerAdmin webmaster@siteA.org ServerName siteA.org ServerAlias www.siteA.org DocumentRoot /var/www/siteA.org/public_html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/siteA.org/public_html/> Options Indexes FollowSymLinks AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/www/siteA.org/logs/error.log CustomLog /var/www/siteA.org/logs/access.log combined </VirtualHost>

siteB.org

# vim /etc/apache2/sites-available/siteB.org.conf ------------------------------------ <VirtualHost *:80> ServerAdmin webmaster@siteA.org ServerName siteB.org ServerAlias www.siteB.org DocumentRoot /var/www/siteB.org/public_html <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/siteB.org/public_html/> Options Indexes FollowSymLinks AllowOverride None Order allow,deny allow from all </Directory> ErrorLog /var/www/siteB.org/logs/error.log CustomLog /var/www/siteB.org/logs/access.log combined </VirtualHost>

4) Enabling the Sites

Now activate the host: # a2ensite siteA.org.conf # a2ensite siteB.org.conf

5) Restarting Apache

Restart the Apache server to initialize the changes: # service apache2 restart

6) Setting Up Local Host

Edit /etc/hosts so that the sites can be found by name: # vim /etc/hosts ------------------------------------ 127.0.0.1 localhost siteA siteB

That's all!
-gibb