MySQL and replication, it has always been a touchy subject. Overall, things work properly. Non the less, on a certain project, we experienced regular replication failures: Error ‘Can’t create table ‘db.temp_table’ (errno: -1)’ on query. Default database: ‘db’. Query: ‘CREATE TEMPORARY TABLE temp_table … Basically the errors clearly points out that the temporary MySQL table … Continue reading Mysql temporary tables and replication
When developing using Ruby on Rails, you probably already used Rake. Rake is a simple ruby build program. Basically, rake offers somewhat of the same capabilities that make does. Using rails, you probably already used tasks like db:migrate, db:seed, etc In this post, I’ll try to cover the most used features of rake, or at … Continue reading Rake & ruby: some basics to get you started
A few days ago, I tried to make a backup using the mysqldump command and got the following error: mysqldump: Got error: 1044: Access denied for user ‘root’@’localhost’ to database ‘information_schema’ when using LOCK TABLES A quick workaround is to pass the –-single-transaction option to mysqldump: $ mysqldump –single-transaction -u user -p DBNAME > backup.sql … Continue reading mysqldump: 1044 Access denied when using LOCK TABLES
Today, I got reminded of an important thing one must never forget, but over time, we do: Assumption is the mother of all fuckups Got around bug-hunting this afternoon on an agency project. Providing some support on the infrastructure their hosting on, it seemed that users lost their session after a while. Running on a … Continue reading Lesson well learned
Every ruby developer will probably use some kind of ruby version manager. As far as I know, it all started with rvm. Rvm has a ton of features, but I never really was fan. Most of the features that are available where not necessary for me. So since I wanted a minimal tool to manage … Continue reading Chruby: ruby version manager
When working on a CRUD based application, starting with the index view, you’ll want to display a collection. But when the collection is empty, you’ll want to let the user know the collection is empty, by showing a message. Most common scenario I have seen so far is the following construction: <% if @collection.length > … Continue reading Rails: display message when collection is empty
Having a dynamic IP-address at home, I sometimes need to lookup what my public IP is. There plenty of choices in sites that will display your remote IP. But it’s always such a hassle. I never remember one specific site, so I always pass Google and most of the time, I don’t have a browser … Continue reading Show your public IP from the command line
Changing permissions can be tricky, because either way, permissions are on of the corner stones of security. It could be that you want to change permissions recursively on all folders, but not on files, and vice versa. Unfortunately, a lot of people don’t take that into account. So here’s a quick tip on how to achieve … Continue reading Set recursive permissions on only files or directories
Although this might seem a common practice, you would be surprised how many times I come across projects that contain passwords and tokens. When connecting your application tot 3rd party services or even simpler than that, do you commit your production database settings in your repository ass well? Do all team member need access to … Continue reading Don’t commit sensitive data
Three months have gone by without single post. Shame on me ^^ . It’s not that I don’t have anything interesting to write about, but it’s been a hectic time. Besides the projects I already had in the pipeline, I got involved into a pretty large project that just got started. Initially, it was only … Continue reading Busy times