Daily Shaarli

All links of one day in a single page.

November 20, 2013

RegExper: Regular Expressions Explained - SitePoint

Those with several years development expertise will realize it’s a regular expression. But even the most astute guru will take a few moments to determine that it checks the validity of an email address. Only a superior subset of that group will comprehend that it’s fairly superficial and won’t check all possibilities.

Regular expressions are extremely powerful search patterns which can be used for string matching and replacement. They’re supported in the majority of languages including JavaScript, PHP, Perl, Java, C#, Python and Ruby.

Individual rules are normally straight-forward, e.g. [a-z] matches a single lowercase character and c.t matches a three letter string starting with ‘c’ and ending with ‘t’ — such as ‘cat’. However, when rules are combined, an indecipherable string of seemingly random codes starts to appear. The one above is relatively simple compared to many you’ll find in the wild.

Creating your own regular expressions is difficult enough and many of us resort to using the force. But it’s easy compared to parsing someone else’s code — which is normally written by someone who has an irrational aversion to comments!

Fortunately, Jeff Avallone has created a solution to your regex woes. RegExper transforms meaningless JavaScript-based expressions into a graphical representation:

Push notifications from php to Android devices with Minibots Class | Barattalo

More than two years ago I wrote a post about sending push notifications from php to an iOS app called Pushme.To. That code, now, no longer works, and Pushme.to service no longer exists. Now I’m using an Android device and so, I’m going to show you how to send push notifications in a simple way to another app, for Android. The app is called Notify My Android and it’s free.

RHEL / CentOS 6.x KVM Virtualization Installation and Configuration Guide

How do I setup and manage a virtualized environment with Kernel based Virtual Machine (KVM) in CentOS or Red Hat Enterpise Linux version 6 server on IBM server? Can you provide step-by-step commands of how to install and manage Virtual Machines (VMs) on a physical server using KVM for RHEL/CentOS version 6.4?

Tutorial details
Difficulty Advanced (rss)
Root privileges Yes
Requirements VT enabled server
Estimated completion time 1h
KVM is part of RHEL and CentOS Linux. You can easily install the same using the following commands. Please note that only the package names have changed in RHEL/CentOS 6.x. If you are using RHEL / CentOS 5.x, read our previous CentOS / Redhat (RHEL) v.5.x KVM Virtulization guide for more information.

Symfony2 – A High Performance PHP Framework | Classic Informatics Private Limited

What is Symfony2 Framework?
A set of bundles containing configuration and bridge classes
These glue the components together, giving the developer a consistent experience
Symfony 2 is a PHP Framework for web development
Symfony 2 is MVC
Symfony 2 is OOP
Symfony 2 is not Symfony 1 (>=PHP 5.3)
Symfony 2 is HTTP-centric
Symfony 2 is like bits of Rails and like bits of Java
Why Symfony2?
Based on project needs Symfony can be used as:
Full framework
Micro framework (single file apps)
Symfony Components (stand alone)
Symfony comes with tight integration with many open source projects like Monolog, Assetic, Doctrine, Propel.
Powerful and easy routing.
Very advanced and useful template engine TWIG