Vagrant box for rails4 elixir and phoenix using ubuntu trusty64

Vagrant box built with virtualbox as provider and ubuntu trusty64 OS. Software Environment: 1. Rails 4.2 2. Ruby 2.2.4 3. rbenv version manager 4. Elixir 1.2.0 5. Phoenix web framework 6. postgres 9.3.10 7. Mysql 14.14 Can download from: https://atlas.hashicorp.com/pulsarcoder/boxes/trusty64-rails-laravel-phoenix Or using vagrant vagrant init pulsarcoder/trusty64-rails-phoenix; vagrant up –provider virtualbox

Continue reading


Get Slug of string using c#

public static string ToSlug(string value) { //First to lower case value = value.ToLowerInvariant(); //Remove all accents var bytes = Encoding.GetEncoding(“Cyrillic”).GetBytes(value); value = Encoding.ASCII.GetString(bytes); //Replace spaces value = Regex.Replace(value, @”\s”, “-“, RegexOptions.Compiled); //Remove invalid chars value = Regex.Replace(value, @”[^\w\s\p{Pd}]”, “”, RegexOptions.Compiled); //Trim dashes from end value = value.Trim(‘-‘, ‘_’); //Replace double occurences of – or \_ […]

Continue reading


Input Field in Dropdown

In your bootstrap-dropdown.js comment source code row $(‘html’).on(‘click.dropdown.data-api’, clearMenus) and write there this: $(document).bind(‘click’, function(e) { var $clicked = $(e.target); if (!$clicked.hasClass(“dropdown-menu”) && !$clicked.parents().hasClass(“dropdown-menu”)){ clearMenus(); } }); Or, you can add the following to your jQuery script $(‘.dropdown-menu’).find(‘form’).click(function (e) { e.stopPropagation(); });

Continue reading


How to include laravel in eclipse or netbeans with ide helper

Integrate Eclipse with Laravel: Download the following pre-made file that lists the Laravel namespaces: https://gist.github.com/barryvdh/5227822. Create a folder anywhere on your computer to hold this file. For example: D:/Laravel Projects/idehelper.php After you created an Eclipse or NetBeans Laravel project, open project properties and adjust PHP include path to include above created folder.

Continue reading