Spiga

Access Dropbox.com behind corporate / company firewall

May 19, 10 by Gabi Solomon

If you find yourself one morning with your dropbox client not connecting to the server, and you trace the problem to the company/ISP ( or country if your in China :-p ) firewall then you can put the kind words for them to the side a little and try the following.
Most of the firewalls block the main IP for dropbox.com 174.36.30.70 but the alternate IP is open :D

So add this to your hosts:
174.36.30.71 www.dropbox.com

Hope it works for you.

php adwords api library

December 25, 09 by Gabi Solomon

Recently i posted on google code a library we developed to interact with Adwords Api from php.
Php Adwords API Library was developed by Hyperactive team for an internal project, since we didn’t like options available and felt we could do something that would be easier to work with, at least for us. We made it public so that others looking for a php library to interact with adwords api would have more options to chose from ( plus free testing for us :-p ).

The project can be found here:
http://code.google.com/p/php-adwords-api/

It is still a work in progress and does not yet support all the services and functions of the API, but we hope to add more services as soon as possible. And if you need a certain service or function please dont hesitate to add a ticket on google code and request it.

You will find examples of usage in the folder examples of the library.

PDF Generation with Zend Framework

November 07, 09 by Gabi Solomon
Jonathan MaronGuest Post by:
Jonathan Maron has been working in the web application conceptualization and development space since 1996. His current position is with an international company, specialized in the production of word processing components. Being an advocate of the FOSS movement, Jonathan promotes the use of Open Source software and rejects the notion of reinventing the wheel, preferring to develop with established frameworks.

Generating print-ready well-formatted PDF documents with PHP is not an easy task. Traditionally, there are two main approaches to PDF generation with PHP. Given sufficient time and patience, both partially get the job done, but still leave a lot to be desired:

HTML-to-PDF: This approach is widely used in mainstream applications. Here an HTML document is programmatically created and converted to a PDF, using one of the many open source libraries 1. Since HTML, however, is not a page-oriented format (as is PDF), it is impossible to perform a 1-to-1 mapping between HTML and PDF. Typical word processing file format features, such as header and footers, orphans and widows or even page numbers can simply not be represented in HTML.
Read the rest of this entry »

Running for charity

September 09, 09 by Gabi Solomon

I havent posted in a while, will try and restart, but for now i am writing this non-geek related post.

I’m taking part in the Berlin Marathon 2009 on 20/09/2009 to raise money for British Heart Foundation and would really welcome your support.

Please take a moment to sponsor me. It’s really easy – you can donate online by credit or debit card at the following address:

http://original.justgiving.com/gabrielsolomon

All donations are secure and sent electronically to British Heart Foundation. If you are a UK taxpayer, Justgiving will add an automatic 28% bonus to your donation at no cost to you. Please join me in supporting British Heart Foundation and a fabulous cause!

Thanks and best wishes.

Replication / Mirroring as Master-master with Subversion using svnsync

June 26, 09 by Gabi Solomon

For me it all started when my VPS had an error and all my SVN repos were lost. Plus even though i had purchased a backup system from the hosting company that was suppose to do a full server backup automatic and incrementally, i only had a backup from 20 days earlier because the system failed at that point in time and didnt run since.

But enough with my problems, at that point i decided to make a copy of my repos from the remote server to my local machine.
And i would commit into the local one and it should automaticly sync to the remote one. Plus it would need to do this both ways and in real time since i had some external people commiting in the remote server. Easier said then done i camed to find out.

The reasons why

Well for me there are 3 main reasons:
1. as a backup system ( dont want to be put in the 20 days old backup situation again )
2. for faster commits and updates
3. independent of the internet connection ( it hasnt failed in quite a while, but just in case, or for the times its a bit slow )

The alternatives

It seems that this topic is a bit popular, and there are a few places on the internet where people are interested in this. You can check out this question on stackoverflow for one.

1. Git-SVN
This is one alternative that a lot of people have been recommended. The benefits they are you get the best out of both worlds, you can still use the Subversion in the main repo, but you get the power of GIT for your local copy.
Although this sounds very cool, i am more of a GUI guy and really enjoy the subversion integration in my IDE ( Netbeans ) so i would have to pass this options.

2. SVK

svk is a decentralized version control system built with the robust Subversion filesystem. It supports repository mirroring, disconnected operation, history-sensitive merging, and integrates with other version control systems, as well as popular visual merge tools.

At first i read this article about SVK and it seemed to be what i was looking for. But after playing with it for a while i saw that i would need to have a single repo where all my comits would go and that would be synced to several outside repos. But i was looking for a way to have the exact replica of what it is on the remote server so in the case of a failure i could restore them from my backup.

If you are still interested in this you can also read this and this.

3. svnsync + webdav proxy
I knew about svnsync but it only supports read-only copies of your repo. But after reading a small comment on stackoverflow i started looking and find out you can have read-write copies using svnsync and webdav proxy.
What is basicly happening is that your local copy handles the read operations and it forwards the commits to the main repo.

There are a few tricky parts on this solution, that involve the locks and updating of all the replicas of the main repo. This are done by a series of hooks in the main repo.
If youre interested in this solution you can find information about implementing it in this articles:
Subversion transparent proxy with svnsync + webdav proxy
subversion diy write through proxy
Subversion on-the-fly replication

conclusion

Honestly i don’t have one yet :( , but i plant to try using svnsnyc and see how that goes.
I hope you got a big picture of what your options are and now you can decide what suits you best.

Cheers

audit_log_user_command(): Connection refused

by Gabi Solomon

This error happend to me when i runned a command on my Centos VPS.

audit_log_user_command(): Connection refused

And after some googling it seems that a lot of Centos users are running into this when executing SUDO.
But it seens that this is a bug in Centos kernel, and its not fixed yet.
My problem was that i was running the commands logged as root ( silly me ).
Hope you are too, because otherwise i have no sollution for you :( .

Cheers

How to organize your version control repository for multiple companies and projects

May 16, 09 by Gabi Solomon

First of all, a little heads up, this is not a perfect solution, and there isnt one outhere.
There is only the best solution for you at this point in time.

This structure was thought by Victor Stanciu and me after a lot of debating and googling, and so far we are happy with it.

The debate on how a repo is structured is quite a big one, and you can see this by looking on the talks on the matter for example on stackoverflow.com

Considerations

The things we took into consideration is that we are working on mostly small projects ( all of them are web projects ), which are quickly developed and sent into production.
Also there were projects coming from an older client so we wanted a way to group projects from same companies.

Solution

So after we thought all of this through, we decided the best way to go is to have a repository setuped for each project.
The reason we wanted to do this, is because it could trac the revision number more easily and also we could setup the issue-tracker more better. We use TRAC witch only tracs one repo at a time at it would have been weird to have tickets or components from different projects.

The layout would be kind of like this :

/svn
-----/conf
-----/repos
----------/company1
--------------/project1
------------------/tags
------------------/branches
------------------/trunk
----------------------/web
----------/company2
--------------/project1
------------------/tags
------------------/branches
------------------/trunk
----------------------/web

The conf folder is where we keep the configuration files included by apache for serving the repo with mod_dav.

We create another folder web in trunk ad the main project is in there. This is because you might want to have something else in trunk also. Like specification documents.

This is all folks.
Cheers

A TortoiseSVN replacement for Ubuntu

May 12, 09 by Gabi Solomon

I haven’t wrote about this, but i am almost 100% a ubuntu user :D and have been working on ubuntu 8 and now the new 9 version for about 2 months now. And i got to say i am really happy about this move.

But there is one thing i miss from Windows and that is TortoiseSVN, and although i have tried a lot of unix SVN clients none of the seem to really do the trick for me. They all seem to lack some functionality or another.
I know they big boys like to do all from the terminal command, but i am still a bash-fu wannabe so i still use GUI :) .

After a lot of self pity and frustration when i tried to do some SVN operations, and a bit of googling and browsing i stumbled upon Nautilus SVN and i was sold.

NautilusSvn is a Python extension for Nautilus which integrates a load of Subversion functionality into the GNOME Nautilus file manager, basically as a clone of the TortoiseSVN project on Windows.

context_menu

Although still in Beta, it seems to have all the funcionality of TortoiseSVN and a good integration with Nautilus. Haven’t run into any bugs so far, so all is good :D .

Hope you like this as much as i did.
Cheers.

Optimizing Zend Routing

May 06, 09 by Gabi Solomon

After playing with zend framework for a while, and reading left and right, i came to the conclusion that i need to find a way to optimize the Routing in my application.
If you havent notice by now, the routing in Zend takes quite a while, and it increases with the number of routes you have, and with the number of routes that use Regular Expressions.

The easiest way to optimise it would be to reduce the number of rules that use regular expressions and the number of rules all together. But for SEO reasons that is not always possible.

Read the rest of this entry »

Google Analytics API launch

April 28, 09 by Gabi Solomon

It seems to a bit of an old news, but i just found out about it :)

Google has launched Google Analytics Data Export API beta and is now publicly available to all Analytics users. This i think opens up a whole new realm of possibility in terms of web traffic analysis. And it is a very good news for all companies in SEO and SEM domain.
Imagine accessing all the data from the Google Analytics from your own application, automating reports send to clients.

I am looking forward to see the applications that will be build with the new API.

Cheers