Desk2Mob

Desk2Mob

Desk2Mob

If you want to display only a list of directories, enter the following command on the console.

ls -l | grep '^d'

If you want to show just a list of files, type the following command on the console.

ls -l | grep -v '^d'
Posted on February 10, 2014 by Amit Pandya in Linux

sudo yum install gitk
Posted on February 06, 2014 by Amit Pandya in Linux, git

I tried it in Ubuntu 14.04.2 LTS, and it is working fine

Step 1: (the purpose of the first line in designating which interpreter to use for the rest of the file), and save the file as a hello-world.rb

#!/usr/bin/env ruby
puts "Hello World!"

Step 2: (make the file executable with the below command)

chmod u+x... 
Posted on October 26, 2015 by Amit Pandya in Ubuntu, Ruby

You can do a two-way

First way

There is a “Computer” icon on the Desktop, right-click on that and select “Properties”, see image below

alt text

So, the System Properties Dialog will be open, and you can see under th...

Posted on April 17, 2014 by Amit Pandya in Windows7

Open Command Prompt with administrator privileges. Please refer to the image below for more details. Right-click on Command Prompt and select Run as administrator.

Right-click Command Prompt and select Run as administrator.

...

Posted on August 21, 2025 by Amit Pandya in apache

  • A model just generates the model. Scaffold generates a controller and views, too.

./script/generate model mymodelname

  • creates an ActiveRecord model that is typically connected to a database, but doesn't have to be.

./script/generate scaffold scaffoldname</pre... 
Posted on February 03, 2014 by Amit Pandya in Rails2

  • Rails starts its web server on port 3000 by default. If you want to use a different port, such as 8888, run the command below.

ruby script/server -p 8888
Posted on February 03, 2014 by Amit Pandya in Rails2

SQL (Structured Query Language) categories in three languages

1. Data Definition Language (DDL)

Which is also known for Data Description Language used for specifying the database schema, like as creating, modifying, and destroying tables, views, indices, and stored procedures

  • A CREATE statement (example of Create Table)...
Posted on February 06, 2014 by Amit Pandya in SQL

Posted on April 29, 2014 by Amit Pandya in nodejs

Ruby - String Class

Posted on February 21, 2014 by Amit Pandya in Ruby - String-Class, Ruby

  • If you have multiple Rails versions installed on your application, and if you want to create a Rails application using the command below
rails demo_apps

  • In this case, it will create a Rails application "apps" with the latest version installed on our machine.

  • If y...

Posted on February 03, 2014 by Amit Pandya in Rails2

<% .... %> is Scriptlet 

and

<%= ... %> is Expression 
Posted on February 03, 2014 by Amit Pandya in Rails2

  • To rollback your most recent migration, execute the command below

rake db:migrate:rollback
  • If you want to rollback a specific migration, you need to execute the command below

rake db:migrate VERSION=
Posted on February 03, 2014 by Amit Pandya in Rails2

In Ruby 2.4.0, the Fixnum and Bignum classes were merged into Integer, resolving a long-standing issue.

  • Fixnum for small integers (range depends on implementation, usually limited to machine word size)
  • Bignum for larger integers (arbitrary precision)

Let’s see this in action.

Ruby 2.3.3

<code class="h... 
Posted on January 04, 2017 by Amit Pandya in Ruby