year, month, and day from a string

some nice piece of regex here!! 🙂

chérie & code

Given: “03/17/2014”
Get: Year = “2014”, Month = “03”, Day = “17”

There are numerous ways to get them, I’ll show you some easy ones and my favorite one (:

1st way:

note: several ways to substring as well, for more info:

2nd way:

3rd way (my fav):

4th way:

View original post



Business Marketing and IT Consultant | 41studio

Redis  is an open-source, networked, in-memory, key-value data store with optional durability. It is written in ANSI C. The development of Redis has been sponsored by Pivotal since May 2013  until then, it was sponsored by VMWare.  According to the monthly ranking by, Redis is the most popular key-value store.
Before you install redis, there are a couple of prerequisites that need to be downloaded to make the installation as easy as possible. Start off by updating all of the apt-get packages:

By default Ubuntu provides redis server installation by

And you done with the installation of redis server.
But if you want to install latest version of redis server, then you can go through the rest of post.

Once the program has been installed, Redis comes with a built in script that sets up Redis to run as a background daemon. To access the script move into the utils directory:

From there, run the Ubuntu/Debian install script:

View original post 760 more words

Some Useful Ruby Tips Worth Trying


In this blog I’m going to share some ruby (or ROR) tips that I found helpful and somewhat awesome. As compared to other programming, in ruby we can implement any logic in lesser lines of code. So here is the first tip:-

1. Many a times while working on some application in rails we write(try out) long active record queries which run successfully but at the same time we forget to assign the result of the query to a variable. Again to do that we press the UP key then left key until we get back to start point of the query to declare a variable and assign the result to it. But not many of us know there’s a way to do that in no time. See an example below

So in the above example after running a query I have assigned the result to “clicks” variable simply by…

View original post 282 more words

What is a web framework?


What is a web framework?

This is a great article by Jeff Knupp describing what constitutes a web framework and the problems that they solve.

For our client work we’re able to work with any web framework, and have worked with PHP/Yii, Python/Django, and Ruby on Rails. The reason we can handle these frameworks is that they all essentially solve the same problems and contain much of the same concepts.

It’s great being able to work with different languages for projects and different web frameworks as they each have their own quirks and pleasant ideas.

View original post