yum behind a proxy

If you happen to be behind a corporate proxy and need to get “yum” working you could easily set your proxy settings in the “yum.conf” file. The file is usually located here:

/etc/yum.conf

And all you need to do is to set the following variables:

proxy=http://proxy.mydomain.com:3128
# If your proxy server happen to need user/pass credentials for Authentication
proxy_username=proxy_user
proxy_password=proxy_pass
Advertisements

“True North PHP” Talk + Slides

The first day of TrueNorthPHP 2013 is over and there were quite interesting talks to listen and amazing people to meet.

My talk was at 11:00 AM and it went well. It was an honor for me to speak at this conference.

In case you’re interested, you can take a look at the slides on slideshare.

Culture and Ethos

In the IT industry although the culture and ethos make the perfect team and along with technical skills would eventually make the best products, but former is less considered, specially in documents written by technical people.

Today I found a very interesting github repository[1] (Thanks to @katemats) about the culture and ethos of people you should invest in.

Here are some of my favorites:

  • Automate all the things!
  • Happiness is productivity is happiness — at least for people who care about what they do
  • Leadership is not appointed/given, it is earned

And my favorite of the all is:

Pay them as much as you would pay them to keep them from leaving for a higher-paying job

[1]: https://github.com/bjeanes/culture/blob/master/culture_and_ethos.md

Simple PHP HTTP Requests Echo Server

Sometimes you just need to see what you are sending as part of your HTTP request, to make sure the wrappers and the libraries you are using are not malfunctioning.
A simple echo server is very useful for this.

Here is a very simple one, which works with Apache Webserver and it prints out the raw Body of request.

Hope it will help someone.

$headers = apache_request_headers();
echo "-- Headers --<br/>\n";
foreach ($headers as $header => $value)
{
    echo "$header: $value <br />\n";
}
// Printing out the Body of the Request
echo "-- Body -- <br/>\n";
$raw_input = file_get_contents('php://input');
print_r($raw_input);

Deploying digital cross-connected systems

This is an old article which my colleagues(@jmarchadier and Stephen Watson) and I wrote for Ubi’s Engine Room Blog.

Here is video on what the service is all about.

p.s.: My silhouette is in the video as well.

My 2 Cents on HTML5 vs Flash web Games

I totally agree that HTML5 is a strong choice for web-based gaming in the future, but I believe that’s not the case for the present.

I attended a talk in GDC-Online where the title was:
“Creatively Bypassing the Limitations of HTML5 as a Gaming Platform”. [Available at GDCVault]

HTML5 offers variety of tools for the game development, but as you can guess from the title they are not easily achievable, you have to do some tricks to get them working, could it be for 3D, Shading, WebGL, Audio Streaming and so on and so forth.
In HTML5 era, consistency across browsers is a big concern. When it comes to the details, each browser has different implementation and yet they are doing some experiments; adding and dropping some features and APIs.

Even if we take IE out of the question, there are still some solutions working only with WebKit, or only with Firefox…

Adobe is taking a right choice and pushing both worlds, Flash and HTML5. I think they both will exist for a long time.

Adobe using Adobe AIR is now able to compile native apps for Android and iOS (and windows phone in future). This is amazing.

I have done a test using Three.js for mobile. A simple rotating 3D object, it’s really disappointing. Working on Android for 3-4 FPS and not working on iOS at all.
Instead AIR compiled mobile app of a very similar 3D rotating object, is very smooth on both Android and iOS.

To me HTML5 is very nice, lots of feature and very bright future. But still has to mature (specially as a gaming platform).

Flash is consistent across platforms, and lots of tools for development. Also something else that I wanted to point out is their new Profiling Application “Adobe Scout”, which is an amazing tool to profile your Flash App either on desktop or mobile. Not only frame by frame but also, per movie clip and you can drill down to the point to see what’s taking memory or CPU. This is a big advantage especially for game development. (http://gaming.adobe.com/technologies/scout/)

As a fan of both, I think each has their own advantages and disadvantages. Just don’t be bias and pick the right one for your needs. Don’t go for what the buzz is.

p.s: Adobe has dropped the XC APIs as a Premium Feature, and now they are available to all the developers and there is no loyalty.
“””As of January 2013, Adobe is no longer classifying the XC APIs as a Premium Feature. The XC APIs are now available as a standard feature without requiring a separate license agreement with Adobe, nor royalties.”””

My 2 cents on Web Back-End Frameworks

Today a colleague of mine was asking about other’s ideas about dropping WordPress as their main framework for development. As someone who worked with CodeIgniter for a while and in a high-traffic website, I had ideas to share which I would like to share with you as well:

 

I think dropping WordPress is a good idea. It has a lot of unnecessary footprints.

Indeed CodeIgniter is a fast and lightweight framework, among all the other available ones. I used to work with it for quite a while, and I was happy with it till it was hit with lots of traffic, then it started to show that even a lightweight framework has a huge impact on performance. We took the components that were heavily loaded out of the CodeIgniter and with a few tricks performance was improved enormously.

Developing based on frameworks is fast and easy at the early phases of development, but later in the project when you want to do something which the framework is not intended for, you will find your hands tied.

You have to either extend the core, or hack it. Both, means you have to understand underlying layers of the framework, and that is time consuming.

I believe the best way is to implement your own core architecture. This way you master the core and you can tailor it to your exact needs.

Then you can use libraries/components/frameworks around it for specific features. (e.g. Django’s admin features are amazing and super-fast to setup, but you could only benefit the Admin section from Django and not the whole architecture).

YOU should be the Master of your application’s framework and not vice versa.

I heard once this beautiful saying about frameworks from “Stefan Priebsch” (@spriebsch); imagine “Ruby on Rails”, it’s on “Rails” so it’s very fast, but when “The Rail” twists, you have to twist too, you have no other choice!

That was my 2cents on back-end architecture. Here is a good article, worth reading.