-
How to pass variables to a Docker container when building a Node app
Environment variables are declared with the ENV statement and are notated in the Dockerfile either with $VARIABLE_NAME or ${VARIABLE_NAME}. Passing variables at build-time The ENV instruction sets the environment variable to the value. The environment variables set using ENV will persist when a container is run from the resulting image. For example: The Dockerfile allows you to specify arguments…
-
Geo Proximity Search: The Haversine Equation
I’m working on a project that requires Geo proximity search. Basically, what I’m doing is plotting a radius around a point on a map, which is defined by the distance between two points on the map given their latitudes and longitudes. To achieve this I’m using the Haversine formula (spherical trigonometry). This equation is important…
-
Check whether your web server is correctly configured
Last year Zone-H reported a record number of 1.5 million websites defacements. 1 million of those websites where running Apache. When it comes to configuring a web server, some people tend to turn everything on by default. Developers are happy because the functionality that they wanted is available without any extra configuration, and there is…
-
OSCON 2010, The O’Reilly Open Source Convention
A couple of weeks ago I attended the O’Reilly Open Source Convention (OSCON) in Portland. OSCON has hundreds of sessions and activities focused on all aspects of open source software. I met some great people, the talks were good and I saw some promising ideas and technologies. Workshops attended Android for Java Developers Marko Gargenta…
-
Implementing Dynamic Finders and Parsing Method Expressions
Most ORMs support the concept of dynamic finders. A dynamic finder looks like a normal method invocation, but the method itself doesn’t exist, instead, it’s generated dynamically and processed via another method at runtime. A good example of this is Ruby. When you invoke a method that doesn’t exist, it raises a NoMethodError exception, unless…
-
Command-line memcached stat reporter
Nicholas Tang wrote a nice little perl script that shows a basic memcached top display for a list of servers. You can specify thresholds, for instance, and it’ll change color to red if you exceed the thresholds. You can also choose the refresh/sleep time, and whether to show immediate (per second) stats, or lifetime stats.…
-
Database Replication Adapter for Zend Framework Applications
Last updated: 21 Feb, 2010 Database replication is an option that allows the content of one database to be replicated to another database or databases, providing a mechanism to scale out the database. Scaling out the database allows more activities to be processed and more users to access the database by running multiple copies of…
-
Real Time Web-Based Service Monitoring Tool
phpWatch is a general purpose service monitor that is able to send notifications of outages via e-mail or text-message (SMS). The purpose of this system is to allow administrators to easily check the status of many different services running on any number of servers and also allow developers to interface with the query and notification…
-
Apache Log Analyzer 2 Feed
I found this project thanks to Raphael’s post Turning a Zend_Log log file into an RSS feed. Developed by Simone Carletti, ApacheLogAnalyzer2Feed is a really powerful open source PHP 5 class to parse and analyse Apache Web Server log files. Results are converted into a feed to let users subscribe them with a feed reader.…
-
ActiveRecord: JavaScript ORM Library
Aptana has just released a beta version of its ActiveRecord.js which is an ORM JavaScript library that implements the ActiveRecord pattern. It works with AIR and other environments: ActiveRecord.js is a single file, MIT licensed, relies on no external JavaScript libraries, supports automatic table creation, data validation, data synchronization, relationships between models, life cycle callbacks…
-
Four Great InfoQ Presentations
Hope you like these recommendations and if you know of any other good tech-related video, then please let me know. 1. Developing Expertise: Herding Racehorses, Racing Sheep One of my favourites. In this presentation Dave Thomas (The Pragmatic Programmer) talks about expanding people’s expertise in their domains of interest by not treating them uniformly as…
-
Using Unison to synchronize more than two machines
Rsync is great, however, it only synchronizes files in one direction. Unison, on the other hand, synchronizes both ways. It allows two replicas of a collection of files and directories to be stored on different hosts, modified separately, and then brought up to date by propagating the changes in each replica to the other. Why…
-
Zend Framework Automatic Dependency Tracking
When you develop or deploy an application, dependency tracking is one of the problems you must solve. Keeping track of dependencies for every application you develop is not an easy task. To solve this problem I’ve created Zend_Debug_Include, a Zend Framework component that supports automatic dependency tracking. We all agree that dependencies cannot be maintained…
-
Building desktop Linux applications with JavaScript
During his keynote presentation at OSCON last year, Ubuntu founder Mark Shuttleworth described application extensibility as an important enabler of innovation and user empowerment. Citing the Firefox web browser and its rich ecosystem of add-ons as an example, Shuttleworth suggested that the Linux community could deliver a lot of extra value by making scriptable automation…
