Change the Color of Images Using CSS

If you have a logo, for example, that is a transparent PNG or SVG, you can change its color using CSS in the following ways:

Grayscale:  filter: grayscale(100%);
Solid Gray: filtercontrast(0);
Solid Black:  filter: contrast(0) brightness(0);
Solid White:  filter: contrast(0) brightness(2);

You can adjust the contrast value between 0 and 1 to achieve different levels of darkness.

Easiest Way to Make Good Steak

Instructions

  1. Buy steak meat (ribeye, new york,etc) (e.g. from Costco)
  2. Measure the thickness of the meat, e.g. 1.25 inches thick
  3. Preheat an indoor grill to the max temperature. I have the Hamilton Beach 25361 Electric Indoor Searing Grill. Choose the “sear” setting which is the max temperature.
  4. Pat both sides of steak with paper towel to dry it as much as possible
  5. Smear 1.5 tablespoons of olive oil or melted butter on both sides of meat
  6. Put salt and pepper on both sides of meat (don’t be afraid to put more than you think – the thicker the meat, the more the salt and pepper)
  7. Insert a cooking temperature probe through the side of the steak until the tip is at the center of the thickest part of the meat. My probe has a silicone cord so it can withstand high temperatures.
  8. For a medium done steak, the internal temperature should be 135 degrees.
  9. When preheating is done (green light turns on), put the meat on the grill, close lid, and grill for 7 minutes.
  10. After 7 minutes, turn over on grill.
  11. When the internal temperature reaches the desired temperature, e.g. 135 degree, the probe will beep. Turn off the grill, move the steak to a plate, cover it, and let it rest for 2 minutes. During these 2 minutes, the internal temperature will rise a few degrees, which is expected, and the steak will be juicier.
  12. After 2 minutes, eat and enjoy

Notes from JS Conference Workshop: Extreme Web Performance

WPO

WPO stands for Web Performance Optimization. It’s similar to SEO and it’s a real field of interest. The Velocity conference just deals with WPO.
https://conferences.oreilly.com/velocity/vl-ca

Optimization Comparison

Service optimization makes up 16%. If you optimize the server by 50%, you see a 10% improvement.
Front end optimization makes up 84%. If you optimize the front end by 50%, you see a 45% improvement.

Continue reading Notes from JS Conference Workshop: Extreme Web Performance

Notes from JS Conference Workshop: Mastering Chrome Developer Tools

JavaScript Debugging

There’s an ability to blackbox JavaScript libraries like jQuery so that when you step over lines of code, you’ll step over these 3rd party libraries. There’s also an ability to set breakpoints on event listeners which can be very handy. Under Settings, you can globally blackbox 3rd JS libraries so you don’t have to blackbox every time you open Chrome. There’s also the ability to create conditional breakpoints, e.g. to break when your about to execute an XHR (AJAX) request to a certain URL.

Editing CSS

When you edit CSS in the Elements tab, you can have those edits write to the source CSS file, and vice-verse from the source file to Chrome. This only works for CSS. To do this, drag your CSS file or entire project folder into the Sources tab. If Chrome can’t auto-map, you can manually map the CSS file.

Continue reading Notes from JS Conference Workshop: Mastering Chrome Developer Tools

Energy Star Light Bulbs

Light bulb wattage doesn’t always result in the same brightness. If you buy light bulbs, find EnergyStar ones were the lumens are within the following ranges

Learn more at https://www.energystar.gov/products/lighting_fans/light_bulbs/key_product_criteria

Rated Wattage of the Referenced Incandescent Lamp (watts) Light Output (Lumens)
25 250-449
40 450-799
60 800-1,099
75 1,100-1,599
100 1,600-1,999
125 2,000-2,549
150 2,550-3,000
200 3,001-3,999
300 4,000-6,000

Deploy Cloud9 Changes via S/FTP Using Git and PHPloy

Cloud 9 already comes with Git, PHP and Composer.

——————–
EXAMPLE FOLDER STRUCTURE
——————–
/home/ubuntu/website1
/home/ubuntu/website2
/home/ubuntu/website3
/home/ubuntu/PHPloy

——————–
INSTALL PHPLOY
——————–
Go to https://github.com/banago/PHPloy
Download and unzip the repo
Create a folder called “PHPloy” in Cloud9 in the “workspace” folder so that that folder is a sibling of your website folder(s). Continue reading Deploy Cloud9 Changes via S/FTP Using Git and PHPloy

Stereo vs Surround Sound

A lot of people don’t really understand the difference between stereo and surround sound and usually just assume that surround sound is better. Based on my research, here’s a summary of the differences.

Surround Sound

  • Intended to hear some sounds at different places around you, e.g. an ambulance zooming by in which case you’d hear the siren begin from one side of a room and end on the other
  • Most surround sound systems involve 5 speakers and 1 subwoofer (5.1 system). For long rooms, there may be 7 speakers and 1 subwoofer (7.1 system).
  • Surround sound is most often noticeable in action movies, e.g. you can hear explosions behind you. Surround sound is subtle in drama movies, e.g. you might hear the leaves moving in the background and some traffic in the distance.

Stereo Sound

  • Very little music is recorded in surround sound.
  • Stereo systems require a front left and front right speaker.
  • Stereo creates a sound-field that, more or less, is shaped like a performance stage that is situated in front of you–as if you’re sitting in a theater. Surround sound does too but adds sound at the top, back and sides of you.

Continue reading Stereo vs Surround Sound

Easy Way to Texture Walls and Hide Imperfections

I hate texturing walls. Not because I don’t like how most textured walls look (knockdown texture), but because I can never texture a wall to look close enough to how the pros do it and I don’t like having to wait some period of time and trying to knock down the texture compound using a trowel or knockdown tool. After researching various ways to texture a wall, I conducted an experiment and came up with a process and set of tools that I think make it really easily to texture a wall and have it look nice and close enough to professional knockdown-textured walls.

Materials:

Experiment:

I used a drill attachment to mix the texture compound until it became creamy. Then, I painted the texture compound on the test 2’x2′ drywall using each type of applicator.

texture1

Continue reading Easy Way to Texture Walls and Hide Imperfections