Monday, December 29, 2014

List of VirtualMin error when configuring and the its solutions

I'am as a web developer, often use Virtualmin as Control Panel, but sometimes when configuring i got stuck with the following error. After some research i got the solution to fix the error. I wrote here as reminder for future and also for you if stuck with the same error.

"Your Postfix configuration is missing the system's mail hostname UNKNOWN from the mydestination line, which will cause mail to bounce."
Solution:
Put "UNKNOWN" string inside "/etc/postfix/main.cf" file and in line  "mydestination ="




Hope this writing can help you out there.

Thursday, September 18, 2014

Install Vala with GTK+ 3 in Windows

As you may know, vala have binary release for windows maintain by communities.
https://code.google.com/p/vala-win32/downloads/list
But the binary release are not up to date now, their last release is for vala v0.12.0 on April 2011.

But if you really want to develop an Application with this awesome cross platform programming language in Windows, you still have a way, "build from source".

For build Vala from source in Windows, you can follow my step-by-step guide bellow to install:
- Vala v0.25.4 (latest version when i write this post) with
- GTK+ 3 v3.6.4-20130921 (latest version when i write this post).

Here's the guide to follow:
1. Download MinGW-builds from http://sourceforge.net/projects/mingwbuilds/
2. Run "mingw-builds-install.exe", select :
  • Architecture = "x32"
  • Threads = "win32"
  • Exception = "sjlj"
like picture below:

3. Continue installation wizard, then choose directory where to install MinGW to:
C:\mingw-builds


4. After installation finish, download the latest "external-binary-packages" from http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/ then copy/extract the "msys" directory to:
C:\mingw-builds\mingw32


5. Open "C:\mingw-builds\mingw32\msys\etc\fstab" with Notepad++ and add this line:
C:\mingw-builds\mingw32 /mingw
in it then save.

6. Download the Win32 GTK+ v3 "all-in-one bundle" from http://www.gtk.org/download/win32.php and then copy/extract it's content to "C:\mingw-builds\mingw32".

7. In order to get a nice shell, create a new shortcut, e.g. on the Desktop and set shortcut location to:
C:\mingw-builds\mingw32\msys\bin\mintty.exe /bin/bash -l
then leave shortcut name to "mintty.exe" or "mintty" or "MinGW-Console".

8. Create "home" folder inside "C:\mingw-builds\mingw32\msys" folder then create folder with the name same as your windows login name inside "home" folder.

You can get your windows login name simply with opening "command prompt".

9. Download the latest source tarball from https://wiki.gnome.org/Projects/Vala/Release and then copy/extract it's content to "C:\mingw-builds\mingw32\msys\home\{Your Username}"

10. Add Vala Directory path to your System Variable Path.
Open "Control Panel > System > Advanced system settings > Environment Variables ..."
Add New System Variable with :

  • Variable name = "ValaPath"
  • Variable value = "C:\mingw-builds\mingw32\msys\build\bin"

Then add "ValaPath" to System Variable Path
;%ValaPath%



11. Run the Mintty shortcut you created in step 7 and switch with "cd" to the vala source directory then execute command below:
cd vala-0.25.4/
./configure --prefix=/build
make
make install

If no error found, then your step to install Vala is complete. You can try to execute syntax below to check Vala is Ready:
gcc --version
valac --version
it will return versions for each compiler.

If no error found again, then you may try to create a GUI Application using Vala and GTK+ in windows. For express, you can try sample code from https://wiki.gnome.org/Projects/Vala/GTKSample eg, like below:

Create new File inside "C:\mingw-builds\mingw32\msys\home\{Your Username}" with "gtk-hello.vala" as filename. Then type code below as it's content:
using Gtk;

int main (string[] args) {
    Gtk.init (ref args);

    var window = new Window ();
    window.title = "First GTK+ Program";
    window.border_width = 10;
    window.window_position = WindowPosition.CENTER;
    window.set_default_size (350, 70);
    window.destroy.connect (Gtk.main_quit);

    var button = new Button.with_label ("Click me!");
    button.clicked.connect (() => {
        button.label = "Thank you";
    });

    window.add (button);
    window.show_all ();

    Gtk.main ();
    return 0;
}
then compile that source code using Vala Compiler:
valac --pkg gtk+-3.0 --cc=gcc gtk-hello.vala
if no error found when compile, you can execute the result application with call it:
gtk-hello.exe
it will show window like below:

Ok, Thanks for Reading. If you have problem when following my guide, drop me a comment below.

In other post i will show you how to:
- Run Created Application outside MinGW.
- Remove Empty Command Prompt behind Created Application if run outside MinGW.
- Publish application created using Vala & GTK+ in Windows for Windows OS

Wednesday, August 6, 2014

Free Download ExtJS 4.2.2

If you are an ExtJs Developer, you should know that ExtJs v4.2.2 only available for subscriber-only release. So if you wanna get that but you're not support subscriber then, here's the trick:

Download the extjs 4.2.2 full documentation:
http://cdn.sencha.com/downloads/docs/extjs-docs-4.2.2.zip
then extjs v4.2.2 sources are in: extjs-docs-4.2.2\extjs-build

See You.. :D

Monday, August 4, 2014

Appcelerator/Titanium Error Message "failed to create java virtual machine"

Just now i wanna try to develop test application using Appcelerator/Titanium Framework, after installing then running, i get error message when try to run the IDE with message "failed to create java virtual machine".

If you get same error like me, you can fix that with bellow changes:
- Open "TitaniumStudio.ini" in Appcelerator/Titanium installation directory.
- Make changes as below:
Change:
launcher.XXMaxPermSize to 128m
So it will be like this:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20140116-2212
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-name
Titanium Studio
-vmargs
-Xms128m
-Xmx1024m
-XX:MaxPermSize=128m
-Xverify:none
-Declipse.p2.unsignedPolicy=allow
-Declipse.log.size.max=10000
-Declipse.log.backup.max=5
-Dfile.encoding=UTF-8
-Djava.awt.headless=true
It Should run normally now.. :D

Wednesday, July 23, 2014

Multilevel Sub Menu for Twitter Bootstrap Project

As you may know, with twitter bootstrap release version 3.x, there is no support Multilevel Sub Menu anymore in navbar and dropdown. So as an alternative which is better than you tweak twitter bootstrap by your hand, you can use "SmartMenus for JQuery" which can use side by side with twitter bootstrap and it is Responsive and also Free too.
Check out SmartMenus in it homepage http://www.smartmenus.org/





Tuesday, June 10, 2014

Install PHP-FPM 5.4 in Ubuntu 12.04.4 + Nginx

For the startup i'm following https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04 tutorial to installing LEMP (Linux, nginx, MySQL, PHP) in my VPS. The server Run perfectly. But then for my project i used Laravel 4.2 which required PHP 5.4 for minimal requirement. So then i upgrade the PHP by following http://www.dev-metal.com/how-to-install-latest-php-5-4-x-on-ubuntu-12-04-lts-precise-pangolin/:
sudo apt-get update
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update
sudo apt-get install php5-fpm
After that when i try to view page that contain php code, the server going error.
I view Nginx error from "/var/log/nginx/error.log"
2014/06/10 06:37:18 [crit] 481#0: *1 connect() to unix:/var/run/php5-fpm.sock:", host: "yourdomain.com"

Then found some solution from http://www.queryadmin.com/921/connect-unix-var-run-php5-fpm-sock-failed/:
Edit the pool file "/etc/php5/fpm/pool.d/www.conf" and change:
listen = /var/run/php5-fpm.sock
to this:
listen = 127.0.0.1:9000
Edit the Nginx vHost file "/etc/nginx/sites-available/default" and change:
location ~ \.php$
{
    ...
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    ...
}
to this:
location ~ \.php$
{
    ...
    fastcgi_pass 127.0.0.1:9000;
    ...
}
** If you wrote the fastcgi_pass on /etc/nginx/fastcgi_params file, edit it too.

Restart PHP5-FPM service:
/etc/init.d/php5-fpm restart
Restart Nginx service:
/etc/init.d/nginx restart

That's it, you may solved the issue now. Have Fun.

Friday, June 6, 2014

Redirect Loop when PhpMyAdmin as SubFolder in Laravel Public Directory

If you use laravel in a hosting then you add PhpMyAdmin as subfolder in Laravel Public Directory, you may get error message as seen in image below:


For the solution, you can do one of the following guide:
1. Visit PhpMyAdmin with:
 http://yourdomain.com/phpmyadmin/index.php 
or
2. Open .htaccess file in laravel public folder, then comment out/remove line below:
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301] <-- Comment Out or Remove this line

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>
That's it, you can access PhpMyAdmin normally.

Saturday, May 3, 2014

Run "Linux XAMPP PHP" from Console

If you have installed XAMPP in Linux (Ubuntu), you dont have to install PHP from "Ubuntu Software Center" or "APT" just for executing some script. You can run PHP that already inside XAMPP for Linux to do that. Here's the way to execute it:
 path/to/php path/to/fileyouwantotrun.php  

So for xampp on linux this is
 /opt/lampp/bin/php /opt/lampp/htdocs/yourfile.php  

Wednesday, April 2, 2014

Moving Outlook 2013 IMAP Data Folder to Other Place

If you want to move your Outlook 2013 IMAP Data Folder to Other Places instead of
C:\Users\username\AppData\Local\Microsoft\Outlook
then you can follow trick below:

1. Rename
C:\Users\username\AppData\Local\Microsoft\Outlook
to
C:\Users\username\AppData\Local\Microsoft\Outlook-old
2. Create New Folder where you want the IMAP Data Folder to be stored, Ex:
D:\Email
3. Open command prompt as Administrator and then type syntax below:
C:\WINDOWS\system32>mklink /D "C:\Users\username\AppData\Local\Microsoft\Outlook" "D:\Email"
symbolic link created for C:\Users\username\AppData\Local\Microsoft\Outlook <<===>> D:\Email

4. You can move all of IMAP Data Folder that in
C:\Users\username\AppData\Local\Microsoft\Outlook-old
to your new place (D:\Email) or you can retry to add your IMAP Account Again in Outlook.

Outlook is fooled into still thinking they’re in the old location. But the important part is the new OST’s will be in the desired location.

Source from Here.

Thursday, March 27, 2014

Claim VirtualBox HD Empty Space File Size

If You often Use VirtualBox to do your work, after sometime you will see the Disk (VDI) File Size increasing so Big. Even after you Delete many Files inside Guest OS, it still keep the size larger.

You can do following steps to Reduce it:
1. Run Defrag in the Guest (Windows)
2. Nullify free space:
With Linux guest run this:
sudo dd if=/dev/zero of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile
With Windows guest, download SysinternalsSuite then run this:
sdelete –z
3. After that Shutdown the guest VM
4. Run VBoxManage's compact command
VBoxManage.exe modifyhd thedisk.vdi --compact

All these Step will Reduce your VirtualBox HD. Compare It. :D

Wednesday, March 19, 2014

Best UI Kit For Web Programming

If you are Web Developer and want to have easy layout so you can build your website faster, you can use below UI Kit:

Desktop

- Twitter Bootstrap built by the Creator of Twitter.
- Zurb Foundation built by The Foundation of Zurb Agency.
- uikit built by the Creator of YOOtheme - Wordpress and Joomla Theme Maker.
- ConciseCss by KEENAN PAYNE

Mobile

- Jquery Mobile

Monday, February 24, 2014

How to Run Twitter Bootstrap Documentation in Windows

Hi, you can arrived at here must be because you are Twitter Bootstrap Lover just like me.
Anyway in Twitter Bootstrap version 3.x.x, it's Documentation Changed from pure HTML Files to Jekyll Site. You Can Run it Easely with following Guides Below :

1. Download Ruby Application Stack From Bitnami. Latest version is Better. Here's the Link : http://bitnami.com/stack/ruby then install it.

2. Download Twitter Bootstrap 3.x.x Source Code from GitHub (Documentation Included in Source Code) :
- Latest :
https://github.com/twbs/bootstrap/archive/master.zip
- Archived Version :
https://github.com/twbs/bootstrap/archive/v3.1.1.zip
then Extract it to wherever place you like, eg: "C:\Users\zemmy\Desktop\bootstrap".
3. After that you can follow guide from here to install Jekyll in Windows OS. Or you can follow my following Guide :
  • Make sure you have installed Bitnami Ruby Application Stack and Connected to Internet.
  • Open "Use Bitnami Ruby Stack" from Windows Start Menu or from C:\BitNami\rubystack-1.9.x-xx\use_ruby.bat, then Bitnami Ruby Command Console will open. Then type "gem install jekyll --version "=1.4.2"".
  • After Jekyll Gem Installation Done, type in Bitnami Ruby Command Console "cd C:\Users\zemmy\Desktop\bootstrap" to go to Extracted Twitter Bootstrap Source Code and Documentation Folder.
  • Type "chcp 65001" in Bitnami Ruby Command Console.
  • From the root /bootstrap directory, run "jekyll serve" in the command line.
Voila, Twitter Bootstrap Documentation can Accessible from "http://localhost:9001/"

Update:
For Windows 8 or 8.1 User, if you type "chcp 65001" in Bitnami Ruby Command Console, the Jekyll can't process HTML Page, so blank page will be seen in "http://localhost:9001/".
So to fix this, just skip type "chcp 65001" in Bitnami Ruby Command Console.

Thursday, February 20, 2014

Setup Default website for IP address Visitor in Virtualmin

If you are using Virtualmin as Control Panel for Web Hosting, you may have visitor accessing your IP instead of your Domain. For default, Virtualmin will select first domain which sort alphabetically. But, to make it fix, you can follow step below:
1. Select your prefered domain.
2. Go to Server Configuration > Website Options > Default website for IP address? [Choose Yes]
3. Click Save to Save the configuration.

Setup Default Page For Virtualmin New Website

Virtualmin is one of Free Control Panel for Linux, it can host lot of website in one server. So if you create new website, that root webpage will be show empty.
To put Default Page or Landing Page for every new website created, you can put whatever you'd like into the skel directory. Usually the location is /etc/skel. So, you'd create:

/etc/skel/public_html
And drop an index.html into it with whatever default page you like... be sure to include any images or other bits. You can also, optionally, have variable substitution done within the files--so you could have the page display the domain name or description field in the temporary site.

Visual Studio 2013 – The system cannot find the file specified. (Exception from HRESULT: 0×80070002)

If you have such error after install Visual Studio 2013 then create ASP.NET MVC Project,
The system cannot find the file specified. (Exception from HRESULT: 0×80070002)
The Solution is Reinstall Nuget from here http://docs.nuget.org/docs/start-here/installing-nuget, it’s work for Me.. Cheers.