Posts filed under 'Tutorials'

Optimism

Here I am sitting, thinking of something optimistic to write about. It’s very difficult, so here’s what I came up with…

String inputDir = "/home/user/";
String inputFile = "in.txt";
if (!inputDir.endsWith("/")) inputDir += "/";
File iFile = new File(inputDir + inputFile);
String outputDir = "/home/user/backup/";
if (!outputDir.endsWith("/")) outputDir += "/";
iFile.renameTo(outputDir + inputFile);

Add comment July 3rd, 2008

Eee PC WiFi Woes

I noted here that I constantly encounter WiFi problems. After searching the web, many have said that Linux is not WiFi friendly. I guess it could be true, but I’m not converting my Eee PC to Windows. I agree that hardware drivers are very tricky when it comes to Linux and I suspect it’s causing my troubles (the connection status is forever stuck in PENDING). Well, yesterday I slightly  cleaned up my drivespace and my troubles seem to have went away. However, it’s still too early to conclude. If it really is true, maybe the system is unable to connect because it has no space to store data. I’ll be monitoring this in the next two weeks.

Add comment May 21st, 2008

Icewm Preferences

Manipulation of IceWM for EeePC:

nano /home/user/.icewm/preferences

Add comment May 21st, 2008

Linux: Change FileName/FolderName

Changing file name or folder name in UNIX.

mv OrigFileName NewFileName
mv OrigFolderName NewFolderName

Add comment May 11th, 2008

Pre-Vista Installation on SATA

Okay, as promised I will be documenting the process of installing pre-Vista OS in a SATA drive. However, I will be documenting on a specific unit: Acer Aspire M1640.

PRE-REQUISITES:

STEPS:

  1. Copy all contents of the Microsoft Windows XP/2K3 in a local drive (i.e. C:\tmp\os).
  2. Extract the contents of the driver (Pre-req#2) in a local drive (i.e. C:\tmp\drv).
  3. Run nLite and follow the images below:
    img1 Pre-Vista Installation on SATA
    img2 Pre-Vista Installation on SATA
    img3 Pre-Vista Installation on SATA
    img4 Pre-Vista Installation on SATA
    img5 Pre-Vista Installation on SATA
    img6 Pre-Vista Installation on SATA
    img7 Pre-Vista Installation on SATA
  4. Burn the .iso image into a blank disc.
  5. Insert the finished disc into the Aspire drive and install the operating system. Voila!

Another source: http://paparadit.blogspot.com/2007/06/installing-sata-hard-drive-with-windows.html

19 comments May 2nd, 2008

My Wordpress Upgrade Bash Script

I’m not a UNIX guru, so I can’t really memorize all commands. When upgrading my Wordpress version, I only run four lines of commands, but I can’t remember the parameters. Today, I was in the mood to write a simple bash shell script so that next time all I have to do to upgrade my site are: backup, run the script, relax… The script does not backup data and design files. If you are to use the code, make sure to backup before running the script. Check out Wordpress for backup solutions.


#!/bin/bash

#
# Wordpress Upgrade Script
# Author: Alfonso Varon
#
# PRECONDITION: Data & design backup should have been done.
#

echo “Warning!!! Backup design files and data before proceeding…”
echo -e “\n”
echo -e “Let’s begin…\n”
echo -n “Which site would you like to update ([1]=arot, [2]=sol): ”
read -e SITE
setterm -background $SITE

if [ $SITE -eq 1 ] # upgrade ARoT
then
 echo “Changing to A Record of Thoughts directory…”
 cd ~/public_html
elif [ $SITE -eq 2 ] # upgrade SoL
then echo “Changing to Sapian Online’s directory…”
 cd ~/public_html/xxx
fi

echo -e “We are currently in directory:”
pwd

echo -e “\n”
echo -e “Downloading the latest version of Wordpress…”
wget http://wordpress.org/latest.tar.gz
echo -e “Done.”
echo -e “Unzipping the package…”
tar -xzvf latest.tar.gz
echo -e “Done.”
echo -e “Upgrading…”
cp -rpf –-reply=yes wordpress/* ./
echo -e “Done.”
echo -e “Cleaning…”
rm -rf ./wordpress
rm latest.tar.gz
echo -e “Done.\n”
echo -e “Wordpress files have been upgraded. Go to the administration
panel for further upgrade instructions.”

Add comment April 5th, 2008

WD MyBook WE NFS Enabled

Eee PC comes with XandrOS distro of Linux, therefore the way I access my network files is different than when I’m using Windows. Fortunately, there is a system called the Network File System (NFS). First generation of WD Netcenter are NFS enabled, but my recent acquisition — the MyBook World Edition — is not NFS enabled. Therefore I have to do the dirty work before I can access my audio/video files from my half-terabyte hard drive. The following are the steps I went through before successfully accomplishing the task:

  1. SSH Access in MyBook WE
  2. MyBook WE as NFS Server
  3. Mount the path:
 mount mybook_ip:/shares/internal /mnt -o rw

That’s all folks!

Add comment December 23rd, 2007

Next Posts Previous Posts


Recent Pages

Popular Tags

Calendar

December 2008
M T W T F S S
« Nov    
1234567
891011121314
15161718192021
22232425262728
293031  

Recent Comments

Associated Web Stop

Blogroll

Miscellaneous Hyperlinks

Shirtshop

Feed On

Enter your email address:

Visitors Online

Advertisement

Categories