up

Blogs

How to convert your real system to virtual machine?

I had a real Linux server system that I need to convert into virtual server, because I wanted to sell my old hardware, but I needed the system as backup. This backup is able to run as virtual server. This is a very useful backup method. This tutorial show you how you can convert your whole system into virtualbox system. Virtualbox is a free opensource virtual computer solution from Oracle.

1. Backup your system disk

If you can, put your system disk to another computer. But if you can't do it you can do it the original system.

HTTP AUTH logout method

This code cause logout feeling for your user. The browser will ask again the username and password.

<?php
  header('WWW-Authenticate: Basic realm="protected area"');
  header('HTTP/1.0 401 Unauthorized');
?>

I use it with a logout controller, that set a session variable to true and redirect the request to the home page. And the home page check this session variable, and if it true, it sends these headers and set back the session variable to null.

Blog categories:  Web development

SATA HotPlug and HostSwap in Ubuntu Linux

Check active scsi devices:

ubuntu@ubuntu:~$ lsscsi
[1:0:1:0]    disk    ATA      SAMSUNG HD103SJ  1AJ1  /dev/sda
[2:0:0:0]    disk    ATA      SAMSUNG HD103SJ  1AJ1  /dev/sdb
[3:0:0:0]    cd/dvd  HL-DT-ST DVDRAM GH22NS90  HN00  /dev/sr0
[5:0:0:0]    disk    Generic  STORAGE DEVICE   9451  /dev/sdd
[6:0:0:0]    disk    GT-I5700  - Card                /dev/sdc

Now refresh SCSI devices. Use this command to refresh host0 (or host1, host2, host3):

ubuntu@ubuntu:~$ echo "- - -" | sudo tee -a /sys/class/scsi_host/host0/scan 

Check the result:

SSH port forwarding in nutshell

My goal:
I want to see the intranet website from home with my linux laptop. I can connect over SSH to the intranet web server. But I want to see the webpage in a browser of my laptop.

The solution is SSH port forwarding. From my Linux laptop. Here is the syntax:

ssh -L <myPortNumber>:<RemoteIP>:<RemotePort>  <host> [other ssh options like port and user]

I used this:

ssh -L 8088:127.0.0.1:80  intranetserver.example.com

Now I can click to http://localhost:8088/ on my favorite browser and I can browse the intranet.

Blog categories:  Linux  Unix admin

Open Source CRM Comparison

I would like to choose an ideal CRM for a client. It must be open source. But I don't know CRM systems. I'm starting discover world of CRM systems by this post.

1. Zurmo

Pro:
Awesome design and user interface
Fast ajax and Yii in use
You can configure data structures (contact, company, task, meeting). You can extend anything with custom fields.

Con:
Very young CRM with actually smaller community than other CRMs
Some feature is missing: E-mail marketing, Google Calendar integration, etc.

2. vTiger

Blog categories:  Web development

UEFI BIOS Windows 7 installation problem and solution

New ASUS K55 Laptop with UEFI Bios

I have a client who bought an ASUS K55VD laptop. This laptop is coming with Windows 8. But my client had bought a windows 7. So He wanted to use this windows 7 on his new laptop. I had another task. I had to change the HDD to SSD. It sounds easy, doesn't it?

Problems was coming...

I have never seen UEFI BIOS before. I did not think this will be a challenge for me. I tell the truth I wasted a lot of time to install the OS.

Blog categories:  Hardware

Good marketing list builder for wordpress

I have read a good post about a Wordpress plugin that help build a list. All marketing guru says 'Build a list!'
Yes this very important in almost every business and you need the right tool. This post about that tool.

Blog categories:  Web development

Fastest and easy to use URL shortener

Here is my favorite URL shortener tool: RX.hu. This is fast and really easy to use URL shortener. There are some alias for it: resize-linx.com, resize-links.com, resizelinks.com, etc. All of these are the same link shortener tool. No advertisement all. There is the fastest redirection that I have ever seen. Try it and use it.

Blog categories:  Web development

My new JustCloud storage account

I found a very fast and easy to use online storage solution. My free dropbox account was too small for backing up my files. I mostly backup my most important files with dropbox online storage, but the 2Gb too small for me. I saw the dropbox pro pricing that was almost $10 for 100GB. When I found the JustCloud storage it was less than $10 for unlimited storage. I think it is good offer to me.

Blog categories:  Unix admin  Hardware

How to remove accidentally added files from git

I've read ti in stackoverflow:

E.g. to remove all *.gz files accidentally committed into git repository:

du -sh .git #==> e.g. 100M
git filter-branch --index-filter 'git rm --cached --ignore-unmatch *.gz' HEAD
git push origin master --force
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
Blog categories:  Programming
Blog tags:  programming  git