Welcome

What you will find here:
C/C++, Java, PHP, FreeBSD, Linux, Miscelaneous programming stuff and articles, Design Patterns, etc

Get in Touch

Articles


Sniffing in PHP using libpcap: Thank you SWIG!

I've been wanting to try SWIG for a long time, but never got the chance, for one thing or the other. So this weekend I've finally decided to give it a try by trying to create a php extension that access a small C++ wrapper for libpcap, so I can sniff packets directly from PHP. Just for fun (and actually because I couldn't find any active pecl extension to use libpcap, so it might as well be something useful). I've named it "SimplePcap".  Read More »


PHP Continuous integration, with Jenkins and Phing

This article is about how to use Phing in your projects, so a continuous integration server (in this case Jenkins -ex Hudson-) can generate the necessary artifacts for your php application (deployment artifacts, documentation, code metrics, etc). I'll try to show why this will make your life easier when developing or auditing code, generating releases and deploying new versions, trace bugs, etc.  Read More »


How to make a cross compiler (gcc) for freebsd under linux. A small tutorial.

I manage a Hudson CI Server that runs on a linux system where I work, and one of our projects is written in plain C code that should be able to run on linux and also freebsd 7. Up to now we were using a freebsd (hudson) slave node in order to build the freebsd binaries.  Read More »


Making an Asterisk Manager Interface monitor using PHP, PAMI, and Ding (Inversion of control and dependency injection in your php telephony applications)

Here, I'll write about AsterTrace (https://github.com/marcelog/AsterTrace), a simple project that will help you get started using the asterisk manager interface.  Read More »


Mocking global php functions for unit testing

Let´s say you´d like to achieve a 100% coverage of your code in your php application (you obsessive geek..). It´s almost certain you´ll need to start mock´ing things around. So far so good.. but sooner or later you will need to deal with the test cases for the code that use global php functions. How can you mock them?  Read More »


Bami: A Proof of concept asterisk manager interface (AMI) client written in bash

In this article I explained the inners of the AMI protocol, and talked about actions, events, and responses. As a complement of that article I wrote (just for fun) a little shell script  Read More »


How to setup nginx to work with FastCGI and PHP 5.2 and PHP 5.3

Nginx seems to be the new silver bullet nowadays, so I've decided to give it a try. Of course it is fun to get it up and running and serve static content  Read More »

Software


Ding

PHP DI (Dependency Injection), AOP (Aspect Oriented Programming), JSR 250/330 annotations, xml and YAML for bean definitions, lightweight, MVC (Model View Controller), syslog, tcp client and server, with non blocking sockets, and custom error, signal, and exception handling. Similar to Spring (java)


Erlagi

An AGI (Asterisk Gateway Interface) client implementation in Erlang, suitable to make telephony applications using erlang.


SimplePcap

A small C++ wrapper for libpcap, shipped with a SWIG interface file for PHP. Allows packet capture and injection directly from PHP code. Comes with a sample PHP sniffer as an example.


Erlami

An AMI (Asterisk Manager Interface) client implementation in Erlang.


PAMI

PHP Asterisk Manager Interface (AMI) supports synchronous command (action)/ responses and asynchronous events using the pattern observer-listener. Supports commands with responses with multiple events. Also supports SMS via VGMS boards. Very suitable for development of operator consoles and / or asterisk / channels / peers monitoring through SOA, etc


PAGI

PHP AGI (Asterisk Gateway Interface) facade, with CDR (Call Detail Record), Call spool and schedule auto dial, Send and Receive Fax, Channel Variables, and Caller ID management


NAMI

Node Asterisk Manager Interface (AMI) A port of PAMI in JavaScript to run with node.


AnoForPHP

Patch for ZendEngine/PHP (5.3.5) to allow native annotations in the language by using the token "@@" (the @ was already taken). It allows 0 or more annotations in classes, methods, properties, and arguments for methods with 0 or more arguments per annotation

About


Hello there.

It's been a while since I published my last software and/or articles. Frankly, I miss the feeling ;)

So I hope you enjoy whatever thing you can find here.

Please contact me if you have any kind of comments or feedback that can contribute anything at all.

PEAR Channel
CI (Jenkins) Server
Resumé at careers 2.0
User at StackOverflow
LinkedIn Profile
Freshmeat Profile
Ohloh Profile
Twitter: @mgornstein