June 2011
1 post
2 tags
Getting brief Git repository information
A good bash script that shows brief information about a Git repository. I’ve found the script here: http://goo.gl/QUe5t.
Jun 2nd
May 2011
1 post
“If you have something that you don’t want anyone to know, maybe you shouldn’t be...”
– Google CEO Eric Schmidt
May 23rd
April 2011
1 post
6 tags
boolean toggle
While exploring Tumblr, I saw the following post: ec1975: …when switching don’t mind using: if ($val==0) $val = $1; else $val = 0; instead use: $val = abs ($val-1); It’s ok (except the $1 typo); but the following solution is far more efficient: $val ^= 1; I saw the post and wanted to leave a comment; but I couldn’t. That’s why I’m posting this. :)
Apr 7th
3 notes
March 2011
4 posts
1 tag
Whenever Ubuntu makes a new release, I realize that I’m getting older…
Mar 23rd
3 tags
Solution to the "svn: Item is not readable" error →
Mar 22nd
3 notes
7 tags
Running shell commands on a remote machine
If you’re familiar with unix-like systems, probably you’ve already worked with shell commands. My favorite shell is Bash and this post is about running Bash commands on a remote machine; but I guess the idea behind it can be used in other Unix shell systems too. As a web developer, I frequently have to deploy projects to remote servers. When something changes, I need to re-deploy the...
Mar 9th
3 notes
Assigning Static IPs to Specific Devices on...
I have a server at home. I use the fiber internet connection service of Superonline at 20Mbps. During the initial setup, they provided me Pirelli’s modem (PRG E4202G). Why I’m writing this post is my negative thoughts about the usability of its management console. It’s really hard at first to find out how advanced settings can be configured. It’s likely you’re lost....
Mar 2nd
December 2010
1 post
6 tags
Fixing indentation and converting tabs to spaces...
I use VIM as the default text editor on my Ubuntu box and generally work on HTML files. It’s a common problem of developers to edit a malformed (e.g. indentations are bad, tabs are used instead of spaces) source code. When I encounter such a situtation, I enter the following commands in VIM to make the source code more readable (I wrote html as the filetype; but of course you should change...
Dec 19th
2 notes
September 2010
1 post
9 tags
jdk installation on Ubuntu 10.04
onur@grizu:~$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" onur@grizu:~$ sudo apt-get update onur@grizu:~$ sudo apt-get install sun-java6-jdk
Sep 2nd
July 2010
3 posts
6 tags
Change Default Controller in Zend Framework
By default, Zend Framework dispatches a request to the IndexController if no other controller is defined (modules, controllers and actions are selected via URL). Like me, you may want to change the default controller for some reason. In Zend Framework, you can do that by adding or changing the resources.frontController.defaultControllerName property in the application.ini file. It looks like...
Jul 22nd
6 tags
Fetching Configuration Data from Action...
If you’re familiar with Zend Framework, you probably know what an application-specific configuration file is. I tend to use application.ini file (located under the /application/configs directory) to store my application’s configuration data and generally use these variables in the bootstrap file. Today, I needed to reach smtp configuration values from within a controller and it took...
Jul 20th
6 tags
SVN Repository Relocation
Our SVN server has its own IP 192.168.1.200 in our local network and we use svnserve as the server program. A few minutes ago, I needed to change the name of a repository from hede to hede.web and I did it this way: On the server, i ran this command: /var/repo$ mv hede hede.web Then, on my development environment I needed to update the working copy: ~$ cd /var/www/svn_hede /var/www/svn_hede$...
Jul 17th
June 2010
1 post
6 tags
phpMyAdmin Setup Interface
phpMyAdmin can be configured through it’s usable setup interface (something like http://localhost/phpmyadmin/setup). In most cases, you’ll have to authenticate first to access the panel. The credentials for this authentication can be found in /etc/phpmyadmin/htpasswd.setup file. You’ll probably have to generate a password before doing anything else. You can do that online. I tend...
Jun 22nd
March 2010
3 posts
9 tags
JavaHL Library loading failure when working with...
Before reading further, please note that by the time this failure happened, I was using Eclipse 3.3.2 (Build id: M20080221-1800) with the Subclipse 1.6.10 plugin installed, on an Ubuntu 9.10 machine. Eclipse kept giving the following error while working on a project checked out from an SVN repository: Failed to load JavaHL Library. These are the errors that were encountered: no libsvnjavahl-1 in...
Mar 24th
3 tags
Subversion repository creation
For every project I develop, I work with Subversion version-control system. I tend to use it; because it’s easy to use and has great features. I created a separate drive on my development environment - my laptop - which is the main repository of my projects. A Subversion repository can be accessed simultaneously by clients running on the same machine on which the repository resides...
Mar 20th
4 tags
To get the system’s domain name in a Windows environment, use: System.getenv("userdomain") Note that you’re actually calling the getenv method the java.lang.System class; but you don’t need to write the fully qualified name as all classes in the java.lang package are automatically imported. More information about the getenv method can be found here.
Mar 17th
July 2009
3 posts
4 tags
Java Notes - 2 (Thinking In Java)
Java uses namespaces to prevent clashing of datas. To produce an unambiguous name for a library, the Java creators want you to use your Internet domain name in reverse since domain names are guaranteed to be unique. For example, a utility library created by ajoen.com would be named as: com.ajoen.utility After you reversed domain name, the dots are intended to represent subdirectories.
Jul 1st
30 tags
Java Notes - 1 (Thinking In Java)
- You treat (almost) everything as an object, using a single consistent syntax. Although you treat everyting as an object, the identifier you manipulate is actually a reference to an object. - Just because you have a reference doesn’t mean there’s necessarily an object connected to it. Take this example: String s; But in this situation, if you decided to send a message to s (the...
Jul 1st
2 tags
“If we spoke a different language, we would perceive a somewhat different world.”
– Ludwig Wittgenstein
Jul 1st
June 2009
6 posts
8 tags
Using Gmail SMTP within CodeIgniter
I tried to send emails via Gmail SMTP (smtp.gmail.com) using CodeIgniter; but got the following error: ERROR - 2009-06-30 16:54:21 —> 220 mx.google.com ESMTP g9sm76291gvc.10  <br /><pre>hello: 250-mx.google.com at your service, [85.107.180.116] 250-SIZE 35651584  250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250 PIPELINING </pre>Failed to send AUTH...
Jun 30th
3 tags
phpMyAdmin Apache configuration
Even if you’ve installed phpMyAdmin via packet manager, it’s possible that you can’t reach it’s web panel. That’s probably because you’ve not defined phpMyAdmin’s Apache configuration. In order to do that, you can create a symbolic link to phpMyAdmin’s default Apache configuration file under the /etc/apache2/conf.d directory like this: sudo ln -s...
Jun 24th
5 tags
Compiling locale definition files
While installing packages, it kept throwing this error: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = “en_US.UTF-8” are supported and installed on your system. perl: warning: Falling back to the standard locale (“C”). So, I checked the output of the command...
Jun 24th
6 tags
How to make a user a sudoer
Sudo is the basic mechanism on Ubuntu to perform tasks that normally are reserved for the user root only. A sudoer is a user that can use the sudo mechanism. By default, all users of the group admin are sudoers. That means adding a user to the admin group makes him/her also a sudoer. To do that, in your root account type this in the console: adduser <name_of_the_user> admin If you...
Jun 24th
3 tags
Let's make the web faster →
Jun 23rd
6 tags
MySQL 5.1 installation and remote-access...
MySQL 5.1 database server can be installed on an Ubuntu Server from the terminal by typing: apt-get install mysql-server-5.1 The configuration files for MySQL are located in the /etc/mysql/ directory and the default MySQL database server configuration file is my.cnf (used to set global options). You can also create a file in your home directory (~/.my.cnf) to set user-specific options. If you...
Jun 17th