Categories
Mac Web Development

How to set up virtual hosts in the MAMP environment

http://danilo.ariadoss.com/how-to-setup-virtual-hosts-mamp-environment/

Categories
Linux Web Development

Setup PhpStorm to run on OpenSUSE

The problem is that PhpStorm won’t work with the open java openjdk. So you have to install also:

java-1.6.0-sun
java-1.6.0-sun-devel

and not only this. Also you need to add to the .bashrc file in your home directory the following:

#set java paths so PhpStorm can run 
JDK_HOME=/usr/lib/jvm/java-1.6.0-sun 
export JDK_HOME>

Again – it’s for OpenSUSE. On other Linux distributions, the paths may vary.

Categories
Linux Web Development

Mercurial shell commands

Switch branches in Mercurial

Careful!!! It discards local changes!
More about branches in Mercurial: http://mercurial.selenic.com/wiki/NamedBranches

Categories
Linux Web Development

My vimrc custom settings

Categories
Linux Web Development

How To Use Amazon EC2 as Your Desktop

How to use a Linux VM from EC2 as a development machine which costs about $25 if you use it only for the work day and stop it after that.

The connect to the EC2 VM is via FreeNX software which works like Remote Desktop for Windows machines and manages the network latency which reduces the lag.

http://blog.restbackup.com/how-to-use-amazon-ec2-as-your-desktop

Categories
Ruby on Rails Web Development

To Ruby or not to Ruby (on Rails), that’s the question

I’m writing this post as a backup for my current research on Ruby on Rails tandem.

As it seems, Ruby is a more mature OO programming language than PHP. It allows more flexible, human-closer constructions, like for example: 5.minutes + 10.hours

The Ruby seasoned developers describe coding in Ruby as a real fun, I suppose, because of the more human-closer constructions and pure OO approach. In addition to this comes the Rails framework, which utilizes the advantages of Ruby and this results in a really power platform for developing web applications, allowing a great increase of productivity (and fun, while producing 😉 ).

I was very attracted to learning and using RoR after the research, but as it seems, the learning curve takes not exactly little time. And having few projects on the top, plus still learning Zend Framework – it would be a hard burden to carry at once.

However, it seems as a nice investment in technology as it has a lot of potential and there will be open jobs for RoR development rising for the next few years. So, I’m currently not able to dedicate a lot of time in learning RoR, but I would probably do it the near future. I will probably also play with it meanwhile, when there is free time.

Below are the resources I found most informative, while researching for the current topic.

Pro RoR:
http://flnotes.wordpress.com/2008/02/18/should-one-learn-ruby-on-rails/
http://rewrite.rickbradley.com/pages/moving_to_rails/
http://www.buildingwebapps.com/articles/79208-the-rebuilding-and-scaling-of-yellowpages-com
http://www.smashingmagazine.com/2010/10/26/successful-freelancing-with-ruby-on-rails-workflow-techniques-and-tools/

Pro Zend Framework:
http://www.marksanborn.net/php/why-i-use-the-zend-framework/
(Single but enough for me and reflecting exactly my current point of view)

Categories
Ruby on Rails

How to install Ruby 1.9.2 and Rails 3.0 on Ubuntu 10.10

Here is the text version of the tut:
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you

it is more detailed.

And here is the video tutorial, based on the text version:
http://www.youtube.com/watch?v=NmWYZVUln4E

To use mysql2, first need to install the libmysqlclient16-dev package:

[ruby]sudo aptitude install libmysqlclient16-dev[/ruby]

and then:

IF there are problems installing mysql2, here are the steps to try to solve it:

>gem install mysql — –with-mysql-config=/usr/bin/mysql_config

But you need to find the correct path fo mysql_config:

After that try again:

Also make sure you have the mysql2 set in the project’s Gemfile:

[ruby]gem ‘mysql2′[/ruby]

Also, the password in database.yml should be surrounded by “”
If you get an error that rake can’t connect to /tmp/mysql.sock try to comment this line in the database.yml:

[ruby]socket: /tmp/mysql.sock[/ruby]

Categories
PHP Web Development

Drupal Resources

20 Drupal Modules to Boost Your Website’s Functionality

Categories
Linux Web Development

Run Linux GUI programs from a remote Debian server on a Windows machine

To do this, just need to have installed Xming software. You can download it from here:

http://sourceforge.net/projects/xming/

It will install Putty as well. So, open Putty and type the IP address or the domain name of the Debian server (I’ve tested with Debian, but it should also work with other Linux servers).

After that, on the left tree menu open SSH node and choose X11.

Make sure to check “Enable X11 forwarding” on the right-side pane.

For “X display location” type: localhost:0
(it’s zero 😉 )

And that’s it! Click Open and login as usually in the SSH console. Then from there you can start  a GUI app which will run on your Windows machine. For example:

Categories
Linux PHP Web Development

PhpMyAdmin increase import file limit size

Starting with version 2.7.0, the import engine has been re–written and these problems should not occur. If possible, upgrade your phpMyAdmin to the latest version to take advantage of the new import features.

The first things to check (or ask your host provider to check) are the values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file. All of these three settings limit the maximum size of data that can be submitted and handled by PHP. One user also said that post_max_size and memory_limit need to be larger than upload_max_filesize.

There exist several workarounds if your upload is too big or your hosting provider is unwilling to change the settings:

* Look at the $cfg[‘UploadDir’] feature. This allows one to upload a file to the server via scp, ftp, or your favorite file transfer method. PhpMyAdmin is then able to import the files from the temporary directory. More information is available in the Configuration section of this document.
* Using a utility (such as BigDump) to split the files before uploading. We cannot support this or any third party applications, but are aware of users having success with it.
* If you have shell (command line) access, use MySQL to import the files directly. You can do this by issuing the “source” command from within MySQL: source filename.sql.