Archive for the 'Uncategorized' Category

Git Fast Forward

>git branch -a

* development

mylocal-branch

origin/development

>git status

# On branch development
nothing to commit (working directory clean)
>git merge mylocal-branch (you want to merge from mylocal-branch to development branch )

> git push <repository | origin> development

Works if the remote branch ‘development’ has no simultaneous commits from a co-worker, say.

But fails with the following messages if there were simultaneous commits on the remote branch ‘development’

! [rejected]        development -> development (non-fast forward)
error: failed to push some refs to ‘<your repository name>’

Here is how to fix this scenario,

> git pull <repository | origin> +development:development

The ‘+’ option fast forwards the local ‘development’ branch to the remote ‘development’ branch

> git merge mylocal-branch

At this point you have changes from the remote and local ‘development’ branches merged

> git push <repository | origin> development

The changes were now pushed to the repository without being rejected. This is one scenario where you can use fast forward to merge changes and bring local and remote branches upto date.

newline characters in PHP error log or debug output

There is a PHP Predefined constant PHP_EOL that allows you to print a newline character if you are running php CLI or if you are outputting text to an error log file.

Apparently, it is also cross platform compatible.

For a long time I was using print statements to throw debug output and had a hard time reading the blob of text output that was getting spit out.

Now my log output and debug output are much more readable :-)

Some useful and common regular expressions (regex)

Regex for URI

 var uri_re = /^(?:(?:[^:\/?#]+):)?(?:\/\/(?:[^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/;

MPLS ALT.NET - The first get together.

MPLS ALT .NET

MPLS ALT .NET

Yesterday was the first ever MPLS ALT.NET get together at the Bulldog N.E Thanks Ira Mitchell and Jim Swanson for hosting. Judging by the turnout at the initial meet one can easily tell that there is a great enthusiasm for alt .net in Minneapolis.

Jim and Ira do a better job of explaining What ALT .NET is all about.

The folks at Redmond, WA do a great job trying to build awesome tools for developers but often times committing resources to every available tool in the open source community is not possible. Filling this gap is where a community like ALT .NET can help.

The state of Microsoft and the OSS community is better explained by Ayende Rahien.

I hope that this community becomes successful and brings in the best of the OSS, Java and RoR communities into the .NET world.

Is this a Revolution ?

A cool rap video about the Large Hadron Collider (LHC) caught my attention and I shared it with some of my old buddies.

I received a few encouraging words mostly in jest about how I should be involved with something revolutionary like the LHC project and drew a few sarcastic comments too.

The email responses from my friends inspired me to write this post and made me understand the significance of the LHC project a little better and also made me realize how we may be overlooking great revolutions happening around us.

Here is my email response,

Dear XYZ,

Thanks for the encouraging words and I enjoyed the sarcasm too…

Revolutions don’t happen overnight… rather they reach a crescendo at the right moment or they erupt from their simmering state into an eruption almost overnight. The trouble with revolutions, too is that you don’t know when they are happening.

The point of sharing that video was to show, how serious research can be presented in a light manner.

And personally, it had a context to me since I recently read this article, Surfer dude rewrites Physics ?that made references to the Large Hadron Collider.
If you do not have the time to read the whole article , here is a snippet that references the Large Hadron Collider,

“…The ultimate proof, or disproof, could then come when the world’s most powerful particle accelerator, the Large Hadron Collider, begins operating later this year in Switzerland. It is widely anticipated that the LHC will lead to the discovery of new subatomic particles, and string theorists are also betting on it to validate some of their ideas…”

In short, the assumptions we are making about how we are held together in one piece can be shattered by this collider.

This my friend is an example of a revolution in progress since it can explain among other truths the beginning(s) and the end of time…

-Senthil

How to make an animated movie?

Some random yahoo video that I want to watch. I will rate this after I watch the video.

http://www.yahoo.com/s/603013