Tuesday, March 21, 2017

Virus Attack

A nasty virus successfully infiltrated my system defences and here's a log of what happened:

Day 1. Stomach acted up. I thought I was having a bad case of food poisoning.
Day 2. Started having chills and sporadic cold sweating. I took activated charcoal to take care of the stomach problem.
Day 3. Fever started to set it. Resorted to ice and cold water therapy. Water intake doubled.
Day 4. Viral upper respiratory infection was beginning to take place. Fever reached its peak. Not a stomach flu as suspected. Wife had it a couple of weeks ago so I was suffering the same symptoms but in a different sequence. Throat got scratchy. Headache very terrible.
Day 5. Leg muscles got weaker everyday. Stayed in the couch the whole day. The living room became an isolation ward to keep the virus at bay. Very little appetite but tripled water intake to prevent dehydration. Throat felt like a blade lodged in it and got stuck.
Day 6. Fever down to a manageable 37C but flu-like symptoms started to kick in. Lots of mucus due to inflamed sinuses. Throat felt better. Difficult to sleep at night due to PND and dry cough.
Day 7. Started to get my legs back but still weaker than normal. Fever gone but head was spinning when trying to do some walking. Excessive mucus due to rhinitis. Started to eat more solid food.
Day 8. [Ongoing]


Drugs used so far:

1. Gatorade
2. Sinupret
3. Paracetamol
4. Ibuprofen
5. Activated charcoal

Wednesday, July 8, 2015

Create a virtual host in 8 easy steps

Objective: Create a virtual host for the domain valman.net

1. Create a directory in your document root

sudo mkdir -p /var/www/valman.net/public_html 

2. Own the directory

sudo chown -R $USER:$USER /var/www/valman.net/public_html

3. Make the directory readable by the web server

sudo chmod -R 755 /var/www

4. Create the virtual host file from the Apache template

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/valman.net.conf

5. Edit the virtual host file valman.net.conf

    
    ServerAdmin admin@valman.net
    ServerName valman.net
    ServerAlias www.valman.net
    DocumentRoot /var/www/valman.net/public_html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

6. Enable the virtual host

sudo a2ensite valman.net.conf

7. Don't forget to restart apache

sudo service apache2 restart

8. Edit your local host file (/etc/hosts)

127.0.0.1   localhost
127.0.1.1   valman.net

Thursday, August 28, 2014

Drupal 7.3x and Virtualmin GPL Issues

What happened:

I created a new virtual host and managed it using Virtualmin GPL. Uploaded Drupal 7.31 to the document root and got an internal server error 500.

I investigated the apache error logs and found out this line on tail

.htaccess: Option FollowSymLinks not allowed here

Solution:

Edited .htaccess and changed

Options +FollowSymLinks

Option +SymLinksIfOwnerMatch

It's working now but I'm not sure of the performance impacts as stat-ing the file is theoretically slower now.

Tuesday, August 12, 2014

How do I set a system-wide proxy in Ubuntu 14.04 using the terminal screen?

Set the following environment variables: 
 
export http_proxy=http://proxy2.somedomain.com:8080
export https_proxy=http://:proxy2.somedomain.com:8080

Wednesday, January 18, 2012

Problems with RTL8169 after Ubuntu 11.10 upgrade -- SOLVED!

I recently encountered a problem with my onboard LAN controller after installing Ubuntu 11.10.

root@WATCHER:/home/val# lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 11.10
Release:    11.10
Codename:    oneiric
root@WATCHER:/home/val#
I have a dual-boot setup with Windows XP. My PC is wired to the router.

The culprit
PROBLEM:  After booting to Linux, no link can be detected from my LAN controller to the router.

TRIAL #1: I tried booting to Windows and to my horror the LAN controller appeared to be really dead! CONCLUSION: LAN is FRIED!

TRIAL #2: I tried resetting the BIOS defaults and enabled/disabled LAN after several reboots but it was really dead no matter which OS I booted to! CONCLUSION: LAN is REALLY FRIED!

TRIAL #3: In my frustration, I shut down the PC, UNPLUGGED the POWER CORD and was thinking of getting a USB wireless adapter. A few minutes later, I was still not ready to give up and POWERED UP the PC to try another trick.  Miraculously, the LAN controller worked!!! CONCLUSION: LAN is still OK!

Explanation (after some investigation):

My chipset is RTL8169 (Realtek) and there is a bug submitted here.

It seems that Windows is disabling the NIC WAKE-ON LAN during shutdown and is the only one that can enable it during the next Windows boot.  Linux is not checking this state so it cannot detect the NIC when you reboot to Linux after a Windows session.

The hard solution is:
  1. unload driver - rmmod r8169
  2. load the driver again - modprobe r8169
The easy solution is to POWER OFF (unplug!) your PC for a few seconds and the NIC will forget its settings causing Linux to detect its original state.


Whew! Total time wasted: 1 hour 45 minutes.

Sunday, January 1, 2012

2011 in Bullet Points

Here's my 2011 log:
  • Got inducted to the Secret Society of DAS*
  • Regained the 16.5 lbs I have technically lost* 
  • Attended a basketball coaching camp
  • Attended a lot more PBA Games than last year
  • Visited a very cold HK in March!
  • Replaced some of my over-recycled shirts
  • Spent a couple of nights in Tagaytay with friends
  • Launched the biggest project of my career (work stuff)
  • Played a lot of basketball
  • Found it harder to play a lot of basketball than in 2010
  • Coached three men's teams (no luck)
  • Coached two women's teams to the championships
  • Renewed my dormant license and paid a hefty fine*
  • Tried to play Futsal and my team were crowned champions (what luck!)
  • Visited a (still) very cold HK in December!
  • Got a new lens and flash for my camera
  • Wrote my first yearly recap
* Too long to explain

Sunday, February 20, 2011

How to install Vulture's Eye in Ubuntu 10.10

UPDATE:  This should work also for Ubuntu 11.04. Please let me know if it doesn't.

Here's a guide to installing and playing nethack with isometric tiles.

1. Download the latest source code here. It is a 7z compressed archive.

2. Open a terminal and install the 7-zip utilities

$ sudo apt-get install p7zip

3. Install the dpkg-dev package.  This is needed to build a .deb package from the vulture's eye source code that you have downloaded earlier.  Just answer "Y" when prompted.



3. Install other essential packages for building this game.  Expect a download of 18Mb.

$ sudo apt-get install debhelper libsdl1.2-dev libncurses5-dev bison flex libpng12-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev

4. Extract the game source code and put in your home directory, i.e. /home/valman



5. Go to the source directory and run the patch provided by the game developers.

$ patch -Np1 -i dist/linux/debian/debian.patch


6. Now, still in the game source directory, let's build the package!  Expect to wait for a few minutes while your computer compiles the C++ code.

$ sudo dpkg-buildpackage

7. Now, go to your main downloads directory where you saved the file downloaded in Step 1.  You should see a listing of .deb packages there.


8. Install the game data package

$ sudo gdebi vultures-data_2.1.90-1_all.deb



9. Install the game package (same as above)


$ sudo gdebi vultureseye_2.1.90-1_i386.deb

10. Play the game! It's the Applications > Games > Vulture's Eye



Have fun!!


//ValMan