Posts

Howto Set Ubuntu Server IP

Image
Configuring Ubuntu Server IP have never been any easier. Just edit the /etc/network/interfaces file using any text editor on the server. By default, you should have nano and vi in your Ubuntu Server. The simplest and straight forward text editor is nano. So, use this command: $ sudo nano /etc/network/interfaces you should see the default file content like this: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp This is the default network settings on your Ubuntu Server where it use DHCP. So, to set it as static IP. Let say, we wanna setting like this: => Host IP address: 10.1.1.100 => Netmask: 255.255.255.0 => Network ID: 10.1.1.0 => Broadcast IP: 10.1.1.255 => Gateway/Router IP: 10.1.1.254 => DNS Server: 10.1.1.254 You should change the file like th...

Having Fun Programming in Linux with Geany

Image
Sorry for not having any post last month. It's just because I'm getting busy with my workloads and some stuff to do with Ubuntu Malaysia Community . Now I'm back, and I would like to share with you this cool IDE for programming in Linux called Geany. Geany is a light-weight cross-platform GTK+ text editor based on Scintilla with basic Integrated Development Environment (IDE) features. It is designed to have limited dependency on separate packages and short load times. It is available for a wide range of operating systems, such as Windows, Linux, BSD and Solaris. Among the supported programming languages are (according to the documentation) C, Java, JavaScript, PHP, HTML, CSS, Python, Perl and Pascal. Geany is one of the more fully-featured editors on the Linux platform, as most Linux editors adopt a more minimalist philosophy. It is similar to Windows editors such as NoteTab or ConTEXT. It is Free Software licensed under the terms of the GNU GPL. ~ Cited From Wikipedia ~ P...

Some Photos from my office's Desktop

Image
It is Sunday, and I'm checking my old photos... And then, I found my office's desktop photos. You may want to see them. Sometimes, my desk is clean but sometimes, it get horribly messy... This is the average looks of it. Working on these Wireless Rain Gauge development have build up my skills in linux bash programming and I learn a lot on how Single Board computer works. In the beginning, we just create a daughter board and attach it to a hacked LinkSYS WRT45GS board which I've installed OpenWRT so I can embed my bash script inside. But then, we go for TS-7260 board from embeddedarm.com to get more control on the RainGause for version two. Till now, I'm still upgrading the code for more features and stability. Well, that's all for now. Enjoy what you're doing!!

Fixing Read More link appear on Blogger Fullpost

Image
Thanks to Paul Escolar who really use my code on 'How to create expandable post summaries in Blogger' and spot a bug on that tutorial. Hence my code for this blog is already changed for other additional stuff. Sorry for that silly mistakes . As I went to debug my tutorial, I found that whoever follow that tutorial properly will get the same result as Paul's blog. So, here is the explanation and how to fix it. Please check at the last chunk of code on 'Step #1 - Edit your template code' . The old code should look like this: <b:if cond='data:post.labels'> <b:loop values='data:post.labels' var='label'> <b:if cond='data:label.name == &quot;more&quot;'> <a expr:href='data:post.url'>...<b>Read more</b></a> </b:if> </b:loop> </b:if> where the previous screenshot is this: What this code do is checking the 'more' label and put that ...

How to create expandable post summaries in Blogger

Image
I've been tweaking my blog template because I've already bored with my old default template that I use previously. While working on this template, I'm thinking that it may be cool to have my long post to be truncated and have the "read more" link . I found the code from Blogger Help to do this. However, there is one issue with their code where the "read more" link will appear regardless of whether a post has been truncated or not. You can check it out at help.blogger.com on How can I create expandable post summaries? . If you have already read them, you should notice the disadvantages under the Note list which says: Disadvantages: Requires changes to the posts themselves, rather than to the template only. However, the "read more" link is in the template, so it will appear regardless of whether a post has been truncated or not. (Modifying this feature is left as an exercise for the reader.) Do you think it is a good exercise? So, how many of...

How to Install .rpm packages in Ubuntu

Image
Ubuntu normally use .deb package for application installer. However, if you have an rpm file for a package you wish to install, and if you cannot find a .deb debian package in any of the Ubuntu repositories or elsewhere, you can use the alien package converter application to install the .rpm file. Alien is a program that converts between the rpm, dpkg, stampede slp, and slackware tgz file formats. If you want to use a package from another distribution than the one you have installed on your system, you can use alien to convert it to your preferred package format and install it. Despite the large version number, alien is still (and will probably always be) rather experimental software. It has been used by many people for many years, but there are still many bugs and limitations. Alien should not be used to replace important system packages, like sysvinit, shared libraries, or other things that are essential for the functioning of your system. Many of these packages are set up different...

Bash Scripting - Script execution counter

This Linux shell script does nothing than just increasing n value every time it is executed and then keep the value in a file. When the value goes greater than 10, it will drop back to 1. Uhhh... this reminds me to the increasing of the fuel price. But that fuel price will just increase and will never drop back... Lol... Anyway, I wrote this bash script just to make a permanent variable to be used as bash script running counter. With this code, I can count how many time the script have been executed. Here's the code: #!/bin/sh nfilename="./nvalue" n=0 touch $nfilename . $nfilename echo "current n value is $n" n=$(expr $n + 1) if [ $n -gt 10 ]; then n=1 fi echo "new n value is $n" echo "n=$n" > $nfilename Here's the step for testing the script for newbies bash scripter. 1. Create one text file in your home folder. In this example I'm using ncounter as the file name: apogee@apogee-persiasys:~ gedit ncounter 2. Copy and p...