Working with GitHub and Git Using the Command Line

Create a repo in GitHub

Use the master branch as your production branch. This is called origin/master.
Use the develop branch for development. This is called origin/develop.

Get GitHub clone URL

In GitHub, get the URL to clone, e.g. https://github.com/javanigus/test.git

Go to local projects folder

On your locale machine, go to a folder where you want this project to exist, e.g. /Users/ayahya/Projects/
cd /Users/ayahya/Projects/

Clone the remote repo on GitHub to your local machine

git clone https://github.com/javanigus/test.git

This will create a folder that is the name of the repo, e.g. “test” Read More

Easily Add Music to Video Using Corel VideoStudio

Adding your own music or audio to a video clip is something many people like to do. Fortunately, this is very easy using Corel VideoStudio. Below are steps to add music to a video.

Insert media files, e.g.  a video and an audio file

Read More

Common Residential Electrical Wiring

  • Ground wires always go to ground
  • To see if a circuit is correct, there must be a loop. Follow the black wire from the panel (source) and then through the light or outlet and then along the white wire and back to the panel. If there’s a loop, then it’s correct.

Tool Collection

I’ve accumulated quite a bit of tools now to the point that I sometimes forget what I have so I created a personal tool inventory page.

View My Tool Collection

IrfanView for Batch Image Processing

When you’ve got a bunch of images to process, IrfanView makes the process simple and quick. Here’s an example of how to

  • auto trim / remove whitespace
  • resize images
  • optimize JPGs

Open IrfanView and do the following:

  1. File > Batch Conversion / Rename
  2. Work As: check “Batch Conversions”
  3. Look In: Browse to the folder containing all of the images then click “Add All”
  4. Batch Conversion Settings: choose “JPG”, click “Options”, for “Save as quality” choose 65, check “Save as progressive JPG”
  5. Batch Conversion Settings: click “Advanced”,
    1. check “Auto crop borders”
    2. check “RESIZE”, check “Set new size”, for “Set new size to” enter “750” pixels, check “Don’t enlarge smaller images”
  6. Output Directory: create and choose a different directory, e.g.  a subfolder called “processed”
  7. Click “Start Batch”

How to Pick a Ripe Watermelon

  1. It should feel HEAVY for its size.
  2. It should have a creamy YELLOW (not white) spot on one side where it was sitting on the ground.
  3. If you thump it with you finger, as if you were flicking a crumb off your shirt, it should sound HOLLOW.

Image result for ripe watermelon

Affordable Hi-Fi Audio Headphone Setup

So, I’ve been trying to get more out of my music in terms of sound quality and experience. 6 years ago, I thought $30 Sony in-ear earphones were just as good as $200 earphones. Clearly my ears were not trained to know any better. As time went on, I slowly began to notice the difference between quality speakers and crappy ones. I still wanted earphones for their small size and I eventually settled on the BeatsX (bluetooth) which cost $109. The BeatsX are definitely much better than my $30 Sony earphones. Then, as time went on, I noticed that music played in my car sounded better than my BeatsX. One particular experience is the surround sound feeling you get from music in your car. With 6 separate speakers, the sounds from different instruments would appear to come from different directions in a very harmonious way. Since I wanted that experience at home, my research led me to a sound factor called soundstage. The soundstage is a speaker’s or headphone’s ability to add spatiality to the music you’re listening to. Rtings.com explains soundstage in detail and sorts headphones by soundstage. You can see the explanation and ranking at

https://www.rtings.com/headphones/tests/sound-quality/soundstage

Read More

Easily Create Curved Arrows on Mac Using Preview

When you need to annotate a document and explain certain parts of it, using arrows can be very helpful. If you’re on a Mac, adding arrows, both straight and curvy, is very easy using the Preview application. Here’s how to do it

  1. Open an image in Preview
  2. Open the Toolbar (View > Show Toolbar)
  3. Click on the “Sketch” icon (3rd from the left) so that it’s highlighted blue

  4. Choose a line thickness

  5. Click and drag to create a curved line with an arrow just as you would with a pen without lifting the pen. This will result in a curved arrow.

  6. If the curvature doesn’t look right, adjust it by moving the 3 control points.

  7. Then add some text by clicking on the text tool (last icon with the letter A)

    You can also create straight lines by drawing a line. Preview will detect that you are trying to draw a line and make it straight for you.

How to Survive Ramadan By Not Feeling Hungry

Many people dread Ramadan, especially in the US since we don’t get to work half days, because working when your hungry is challenging and can sometimes give you a literal headache. Every year I research foods and try to find the right combination of types of food to eat right before fasting each day (around 4 AM). This year, 2018, I believe I’ve stumbled upon the perfect formula. Based on the USDA’s Dietary Reference Intake calculator, I should consume each day

  • 38 grams of fiber
  • 69 grams of protein

Since we normally eat twice in Ramadan, once in the early morning before beginning your fast and once at night when breaking your fast, we can split these daily values (DV) up, e.g. in half, so that my target for breakfast in the morning would be

  • 19 grams of fiber
  • 36 grams of protein

Fiber gets processed slowly in your stomach which makes you feel full longer. Protein is an essential source of energy.

So here’s my formula:

One cup of oatmeal

I like the Simply Balanced Organic to-go cups of oatmeal, available at Target. These cups cost $1.49 each and are super convenient to prepare in the morning. Just add water, microwave for 50 seconds, stir, eat, then throw away the cup. There are 3 flavors:

Cranberry
Read More

Easily Unclog Drain with Hair and Grease Drain Opener

Recently my shower drain wasn’t draining water as fast as it used to. I normally use Drano but heard about the good reviews that Hair and Grease Drain Opener got which also comes with a money-back guarantee so I gave it a shot. Turns out it worked perfectly the first time. Here’s what I did:

  1. Poured 2.5 cups of the Hair and Grease Drain Opener liquid down the drain
  2. Waiting 6 hours (you can also just wait overnight)
  3. Boiled a pot of water
  4. Poured the boiling water down the drain
  5. Clog was gone