Batchography – Programming the “Hangman game” using the Batch scripting language!

hangman-1In this blog post, I am going to share with you the high level steps needed to build the Hangman game using the Batch scripting language.

To learn more about how the Hangman is programmed using the Batch scripting language, please refer to Chapter 5 in the Batchography book.

flower separator
batchography-good-res
Get the book from Amazon:

  • the print editionbtn-buy-on-amazon
  • or the e-book editionbtn-buy-on-amazon

flower separator

Continue reading “Batchography – Programming the “Hangman game” using the Batch scripting language!”

3 easy steps to setting up a zero configuration multi-platform web server with NodeJS and local-web-server

In this technical post I am going to illustrate how you can use the simple local-web-server package for NodeJS to start your web server in a few commands.

Let’s get started!

Step 1 – Installation

First, install NodeJS from http://nodejs.org/download/

If you are using Windows, then make sure you download the MSI package because it is so easy to install.

Keep the default options as you’re installing:

image

After installing NodeJS, open an elevated command prompt (i.e: run cmd.exe as Administrator) and type the following command in order to install the local-web-server package:

npm install -g local-web-server

You should see something like this:

image

No errors imply that the package has been successfully installed! Continue reading “3 easy steps to setting up a zero configuration multi-platform web server with NodeJS and local-web-server”

Microsoft Surface Studio – A cool All-in-one computer but what’s with 6:18?

During the October 2016 Microsoft event, Microsoft announced the Surface Studio all-in-one computer and I really like it! Good job Microsoft!

https://www.youtube.com/watch?v=BzMLA8YIgG0

flower separator

flower separator

But…I could not help but notice the time and the date on the screen poster to be 6:18 (which is also Saturday, June 18th, 2016)…

 

six-eighteensix-eighteen-2

Any thoughts?

flower separator

 

You might also like:

 

 

How to turn your bookshelf into an e-book library: Digitizing all of your books

digitizing-books-scannedSince I moved to the US, I collected around 350 books. I love books and the thought of giving them up is not a pleasant thought.

Each time I used to move from an apartment to another, the majority of boxes would be packed with books. Each time I travel somewhere for a long period, I miss being able to grab a book from my bookshelf and start reading (most of my books are old and they do no exist in digital format anyway). It is clear that I have attachment to those books.

To break this attachment, I had to make a couple of decisions. The first was whether to just forget about the books, leave them on the shelves and get myself busy with another chore. The other decision was whether to scan and /or give away the books. With that came other questions like how to scan books and convert them to eBooks, what methods to use, how much efforts would it take to convert the books, etc.

I decided to get rid of the books and the trim down on the space they occupy. For the reasons outlined later in this blog post, I chose to destructively scan my books. By scanning the books, I get a digital and searchable copy of my books (in PDF format).

In this blog post, I will share with you different ways you can use to digitize books and then the remainder of this blog post will illustrate how I destructively digitized all of my books and what tools I used. Continue reading “How to turn your bookshelf into an e-book library: Digitizing all of your books”

The 8 methods of teaching – By Sri Aurobindo

biography-of-sri-aurobindo-method-of-teaching

Sri Aurobindo was an Indian nationalist, philosopher, yogi, guru, and poet. Aurobindo studied for the Indian Civil Service at King’s College, Cambridge, England. After returning to India he took up various civil service works under the maharaja of the princely state of Baroda and began to involve himself in politics. He was imprisoned by the British for writing articles against British rule in India. He was released when no evidence was provided. During his stay in the jail he had mystical and spiritual experiences, after which he moved to Pondicherry, leaving politics for spiritual work. — Wikipedia

In this article, I am going to discuss my thoughts about his teaching methods and how much they resonate with my own teaching methods. Continue reading “The 8 methods of teaching – By Sri Aurobindo”

Landmarks, Museums, Parks, Markets, and other recreational sites

This article contains a collection of various landmarks, museums, parks, markets and other recreational sites that have been featured in this blog:

Cities

Museums

Places

Batchography: How to check if your Batch file script is running as an Administrator

In chapter 4 of the Batchography book, I illustrate 3 methods that you can use to check if your Batch file script is running as an Administrator.

In this blog post, I will share with you the method entitled “Using known commands that fail to run without elevated privileges” from the book.

The idea behind this method is to run commands that are known to fail and return a non-zero error code if they are not executed with administrative privilege.

The Batch script would then check the return code and act accordingly:

@echo off


:: 
:: The Batchography book by Elias Bachaalany
::


net session >nul 2>&1

if %errorlevel% neq 0 (
  echo Requires administrative privilege.
  goto :eof
)

echo Script starts here...

flower separator
batchography-good-resDo you want to master Batch Files programming?

Look no further, the Batchography is the right book for you.

Available in print or e-book editions from Amazon.com!

 

flower separatorYou might also like:

Technical cheat sheets

This article is compilation of the various blog posts that contain a set of steps, table of hotkeys and shortcuts and/or other quick information for reference purposes.
cheat sheet
The list below will be updated when new relevant articles are posted in this blog:

Stay tuned!

flower separatorYou might also like:

Seven Golden Keys for Good Health – an advice from Dr. Shinya

fruit-basketI ran into the following article when researching the topic of Kangen Water.

The contents of this blog post has been compiled from excerpts from the “The Enzyme Factor Paperback – April 1, 2010 by Hiromi Shinya MD” book.

I find this article very useful, therefore I am sharing with you slightly modified version of it. It will contain 7 important diet and mental attitude tips to inspire you to have good health and longer life.

Make sure you check the other recommended articles.

flower separator

1. GOOD DIET

You should be consuming 85-90% plant based foods and 10-15% animal based food and proteins.

Plant-based foods

Eat a 85-90% plant-based foods:

  • Eat 50% whole grains, brown rice, whole wheat pasta, barley, cereals, whole grain bread & beans including soybeans, kidney beans, garbanzo beans, lentils, pinto beans, pigeon peas, black, white & pink beans.
  • Eat 30% green and yellow vegetables and root vegetables, including potatoes, carrots, yams and beets and sea vegetables.
  • With the remaining 5-10%, eat fruits, seeds & nuts.

Continue reading “Seven Golden Keys for Good Health – an advice from Dr. Shinya”