...

learn_ruby solutions

A good number of my students have approached me for help on these exercises, which are part of testfirst.org and used as an entrance requirement to...

...

Find and Replace Text from the Command Line in Linux

Use sed sed -i 's/<original_text>/<replacement_text>/' <file.txt> Example: sed -i 's/Bob/Alice/'...

...

Setting up your dev environment

These days most start-ups / engineering teams are using the same dev setup, even if they are using different technologies in their stack. This is...

...

Output to standard out AND a file at the same time

Let’s say you’re running a script, and you want the output to show up in the terminal and be output to a file simultaneously. This is how to do...

...

Automation: For loops in bash (for loops on the command line)

If you have to run a script that processes data for a particular file for a particular day, i.e. your file is on hadoop with the date in the path,...

...

MyISAM vs. InnoDB, and how to switch engines on existing tables

Summary: MyISAM is better for selects InnoDB is better for inserts and updates To switch your table to MyISAM: ALTER TABLE table_name...

...

Pig Error -> ERROR 1070: Could not resolve count using imports

Or: ERROR 1070: Could not resolve sum using imports COUNT() and SUM() are case sensitive, you need to capitalize...

...

How to kill a hadoop job

Hadoop job -list List running hadoop jobs and their job ids. Hadoop job –kill...

...

Can’t restart Apache in Ubuntu

When I try to restart Apache using the command: sudo apachectl -k restart I get this error: apache2: Could not reliably determine the server’s...

...

Installing the Python-MySQL (MySQLdb) connector using the Yum package manager and easy_install

You’ll notice if you try to just do this: sudo easy_install MySQL-python You’ll get some errors. That’s because you’re probably missing...