18 févr. 2014

Deploy to your FTP through BitBucket ... and soon Github

Update - August 2016
FTPbucket is a PHP script that enables you to sync your BitBucket or GitHub repository with any web-server. It works with Git and Mercurial.

This post is outdated. Please go directly to Github to find the latest informations.

FTPbucket is a PHP script that enables you to sync your BitBucket repository with any FTP account.

I was looking for an easy solution to use Git on a webproject with a server with no Git installed (hehe). After checking several solutions, I could not find a free one that could fits my needs.

So :


  • Get the code here
  • Edit the config file and rename it to 'config.php'
  • Copy the deploy folder on your FTP server
  • On Bitbucket>Admin>Hooks, setup a POST hook pointing to http://myserver/deploy/deploy.php
  • You can Push now!


  1. The script only copies the files you are pushing. It means that if you start with this tool when you already have files in your BitBucket repo, they won't be copied on the server. I'm looking for solutions on a full deploy. Which brings me the second point.
  2. I tried to push a 160Mo repo with more than 26 000 files and the POST hook didn't like it. The limit is ~1000 files/push I think. It's an unsolved issue: https://bitbucket.org/site/master/issue/7439/git-post-commit-hook-payloads-has-empty
SOLUTION : When you create a new repo on BB and need to push a lot of files, just do it. Right after, you set up the POST hook and manually copy the repo and FTPbucket files on your FTP.


It should work with Mercurial too but it's not tested yet.

I'm sure a lot of improvements can be made to my code so don't hesitate to fork and improve it! I would be glad to hear about your tests and issues too.


I would like to have a simple GUI to manage logs and configs
I need to implement a way to call for action, when the file copy is done. A post-commit hook.
Add support for SSH, Github and more ...

12 févr. 2014

If you want to get more serious/playfull, get Zed!

Zed is a code editor based on ACE.
The idea is to get a really strong IDE but with a minimalistic UI. And I really like that. I often work with PHPDesigner as I like the holding-your-hand way of doing things.
But sometimes, it's really too much. And it feels like there is an awful lot of wasted space in that kind of tools. The success of code editors based on ACE or with similar looks (Sublime Text) shows the need for such simplicity.

An open project with the 'Project Picker' in the front

I forgot the other good news, you don't need to install anything because it's a Chrome extension: Give it a try

The 'Cheatsheet' will display on many occasions and it's a good kick-starter. Or you can click on 'Manual' to get to it.


As it can be a little bit disturbing at first, I will show you how to change the theme (syntax highlights).

  • Click on 'Configuration'
  • Press 'Ctrl-E' to open a file from this project
  • Type 'user.json' then press 'Enter'. The skeleton is there but it's empty
  • Now 'Ctrl-2' to split the screen in 2 (I like the Ctrl-1-2-3 commands to split the screen as it reminds me of RTS games when you make your teams)
  • On the new window, open 'preferences.json'
As the latest is Read-Only, you need to copy the things you want to change in the 'user.json' window. Like this :
To find the one that suits you, you can try them here.


On the GitHub repo, you can find a lot of files explaining ALL you need to know about Zed but it really needs a Wiki to centralize all that!

Anyway, it's really fun to code with it. It can be challenging to a beginner but it's also a cool way to learn.

Next step: I will try to work on a Dropbox folder and set up an automatic sync with a FTP account.