I Made Krisna's Times My Way to Write the Times

10Aug/110

Get All Local Network Interface Card (NIC) C# Source Code

Yeah, actually i'm back to blogger activities... This is the part of my next projects, M-NIC Projects. The goal is to get all information of our network interface card (NIC) information such as IP addresses, link speed, name, etc. So after doing some head-to-head within some programming languages, my choices is C# .NET, because i think it's easiest way to get that. The result is something like below, i retrieve all of my NIC which status is UP

Name            : Wireless Network Connection 2
Type            : Wireless80211
Status          : Up
Speed           : 4294967295
Description     : Microsoft Virtual WiFi Miniport Adapter
InterNetworkV6  : fe80::e1cf:b2ee:f5c7:e23e%31
InterNetwork    : 192.168.2.1
=======================================
Name            : Local Area Connection
Type            : Ethernet
Status          : Up
Speed           : 100000000
Description     : Atheros AR8152 PCI-E Fast Ethernet Controller
InterNetwork    : 192.168.1.3
=======================================
Name            : Loopback Pseudo-Interface 1
Type            : Loopback
Status          : Up
Speed           : 1073741824
Description     : Software Loopback Interface 1
InterNetworkV6  : ::1
InterNetwork    : 127.0.0.1
=======================================

And here is the code:

31Mar/111

.htaccess URL Rewrite on IIS 7.5

Many web applications distributed with .htaccess file to work properly, especially PHP sites. The problem is coming when the web server that is used cannot read or support the .htaccess operation like url rewrite that is common use of .htaccess files. One of that web server is Microsoft IIS, in this post it will be IIS 7.5.

How to do the .htaccess operation with Microsoft IIS 7.5? There is no way (as i know, please tell me if there is). But there is the equivalent operation with .htaccess file do using web.config on IIS.

First we need the IIS module for importing the .htaccess configuration and convert it to web.config configuration, it's named "URL Rewrite 2.0". The module can be downloaded from Mircosoft IIS official site (http://www.iis.net/download/urlrewrite) choose your windows version x86/x64 or install it automatically using Mircosoft Web Platform Installer.

18Mar/110

Building PHP Webserver on Nginx with PHP CGI

Doesn't like the Apache webserver, nginx didn't have the auto-configuration feature from PHP and library loading. The way to make nginx be a PHP webserver is passing the request to PHP CGI. How?

The first step must be installing the nginx and php5 package. For this post i'm using Ubuntu 10.04 LTS.

apt-get update nginx
apt-get update php5

Check your nginx installation with start the service:

service nginx restart
/etc/init.d/nginx restart

Now, if the nginx working, let's connect it to the PHP CGI. First, run the PHP CGI so that the PHP listen at 127.0.0.1 with port 9000.

/usr/bin/php-cgi -b 127.0.0.1:9000 &

28Feb/112

Fixing Network Problems Ubuntu 10.04 on Dell Inspiron 14R N4010

A few days ago i bought a Dell Inspiron 14R N4010 notebook with pre-installed Windows 7 Home Premium 64-bit Operating System. But as a developer, i need to dual-boot this notebook with Ubuntu 10.04 Lucid Lynx. Although there are some bootloader problems with dual-boot Operating Systems, the Ubuntu installation was successful.

The problem come with the all of network interfaces, both of wired and wireless NIC wasn't able to be detected while installing and after installing the OS. For make it easier let's look what NIC that the Dell Inspiron 14R N4010 had:

  1. Wired LAN : Atheros AR8152 PCI-E Fast Ethernet Controller
  2. Wireless LAN : DW1501 Wireless-N WLAN Half-Mini Card (Broadcom)

24Feb/110

Fix Bootloader Windows 7 and Ubuntu 10.04 using EasyBCD

Installing Windows 7 and Ubuntu sometimes make a mess to bootloader on some computers or laptops. After rebooting the PCs, the bootloader won't shown or some case the Windows choice didn't shown by bootloader or vice versa.  One of the solutions is using application to rewrite the master boot record (MBR). One of the application that can be do this is EasyBCD,  and it can fix the bootloader problems.

EasyBCD Entry Settings

Then how to fix the problems using EasyBCD?