How to install a fully functional web-server(WAMP/XAMPP) on USB/CD

July 29th, 2010 by Claudiu No comments »
Not long ago I had a project with a final requirement a bit different from what I usually do. I was asked to make a server copy and put it on a CD so it can be showed at a presentation. At first I though to install Apache, Php and Mysql separately. And so I did only to notice that httpd.conf links are not as dynamic as they might seem. Putting them on a disk or usb, would have obliged me to copy them to a hard-drive or edit the configuration file each time. So after a long session of brainstorming and Google-ing around, I’ve found the solution. (and a very good one).
The application is called Server2Go and of course it’s free-ware. In the next steps I will guide you on installing it to a CD (The steps for installing on a USB drive are the same, I’ve chosen to write this tutorial for CD because of the read-only factor, which makes things a little harder).
  1. For starters we should download the mini package, when I wrote this it was: PHP 5.2.10, SQLITE, MYSQL 5.0.41.
  2. Install the application to a local partition
  3. Enter htdocs and delete the whole content of this directory
  4. Copy your project in the now empty htdocs
  5. Run Server2Go.exe
  6. After successfully loading, you can access http://127.0.0.1:4001/phpmyadmin to import your project’s database.
  7. To close the server: close the browser that was opened by the application.
  8. Now you can copy everything on the stick, DVD or CD.

This program is very customisable. I invite power users to use pms_config.ini with confidence.

How to install Android Debug Bridge (ADB) on Linux.

July 18th, 2010 by Claudiu No comments »

The Android Debug Bridge (ADB) is a client-server application designed to manage the state of an Android Powered Device.

To install it in Linux, we have to get the Android SDK. We can do that by going to http://developer.android.com/sdk/index.html and downloading the Linux version, by the time I wrote this was: android-sdk_r06-linux_86.tgz

And so I did:

wget http://dl.google.com/android/android-sdk_r06-linux_86.tgz

Now we need to decompress the archive, we downloaded:

tar -zxvf android-sdk_r06-linux_86.tgz

Copy everything to /usr/bin so it can be used.

sudo cp android-sdk-linux_86/tools/adb /usr/bin

And as a final step, we need to chmod it, in order to make it executable.

sudo chmod +x /usr/bin

The usage is simple, but I must note that adb must be executed as root, otherwise it will not see the device properly. Here-s an example, how to start it:


adb start-server
adb devices

If the installation went OK you should se something like:


List of devices attached
570071758f58	device
List of devices attached 570071758f58	device

If you have any questions please leave a comment. Hope you enjoyed my tutorial.

How to get the current external IP from Linux.

July 17th, 2010 by Claudiu 1 comment »

Here’s my code snippet for getting the current external IP address.

Method 1 (using curl):

This one requires curl to be installed.


curl -s  http://checkip.dyndns.org | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'

Method 2 (using wget):


wget -q -O- http://checkip.dyndns.org | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'

I recommend the second because it should work on any system.

Of course you can replace Dyndns with any “IP get” page like http://whatismyip.com.

First steps with Thematic: Installation

July 16th, 2010 by Claudiu No comments »
Thematic

Thematic

Thematic is a great wordpress framework, highly extensible, build with both experienced and beginners in mind. If you need to create a SEO-ready theme, in short time, having valid code, this might be the start place for you.

There are many ways to install this framework, but I’m going to download it from the main website (http://themeshaper.com/thematic/).

For those of you, who have the add theme option in wordpress, you can just search it by the name of “Thematic” and it will pop-up for installation. Since I’m on a developer workstation, this option is disabled for me, thus will proceed as I told.

Creating the child theme.

You should be able to start creating themes in no time. All we have to do now is, drag the thematicsamplechildtheme from the Thematic folder onto the main themes directory and rename it.

Now we open style.css, from our newly created folder, and at the top of the document we see the theme header, change the values to your needs (leaving the Template variable as it is).

If you created wordpress themes in the past you should know what you have to do.


/*
Theme Name: FeralGaming Romania Theme
Theme URI: http://feralgaming.com
Description: This is the default Feral Gaming theme.
Author: Claudiu T.
Author URI: http://rubynize.net/
Template: thematic
Version: 1.0
Tags: Thematic
.
Thematic is © Ian Stewart http://themeshaper.com/
.
*/

If everything went alright, you should see you theme in the selection menu.

Many first-time users ask “Why not just edit, Thematic directly?”. The answer is simple, this is because.

  • a) You can’t use Thematic features to the maximum.
  • b) You lose the ability to update the theme.

This concludes our lesson for today, if you have any questions, please ask.

My thoughts on Linux

July 12th, 2010 by Claudiu No comments »

A friend asked me yesterday why do I love Linux so much, so I decided to make a blog post out of it, to express my gratitude for this great operating system.

Probably the first thing you will notice when moving to a Linux distribution is the fact that everything works. When Windows promises “something” that usually something doesn’t really work that good. But hey, here comes open-source, with plenty of bugs fixed and features added everyday I’m sure you’ll get most of your box. Talking about that, it worked on any machine I used it on.

Eye-candy

In love with Microsoft’s Aero? Then you’ll never miss it ever again. Compiz Fusion has some mind blowing eye-candy, highly configurable and of course with a smaller memory consumption. You can choose from millions of themes, beat that Vista!

Software

I also find the installation process fun (this includes setting up applications and stuff like that). OK maybe I am geek, but it was so addictive. After installing Ubuntu, you are facing a gigantic application catalog, and with a few clicks you are all set to go.

It takes a few days to accommodate to the changes, but everything really works as it should, when you fully get the hang of it, you can do as much as everything.

What is your opinion on Linux?

How to recover your pppoe / dial-up password from Ubuntu.

July 5th, 2010 by Claudiu No comments »

Recovering your pppoe/dial-up password in Ubuntu is simple. What you have to do is:

  1. Open a terminal window.
  2. Type “locate secrets” – the file I am looking for is /etc/ppp/chap-secrets
  3. “sudo -i” to login as root (enter your root password)
  4. Now use: “cat /etc/ppp/chap-secrets”
  5. Voila. Your password should be stored in a simple format like: “username” * “password”. You get the picture.

This article was written for recovery or educational purposes only.

Trentemoller – Miss You

December 29th, 2009 by Claudiu No comments »