Nested JavaScript Loops Containing Async Functions That are Forced to Run Synchronously Raw

Sometimes you may need to a lot of processing in a loop. Each loop may call an asynchronous function, e.g. calling an external URL or writing to a file. If this needs to be done synchronously, you can use the async JavaScript library.

Quick Slideshow Video Creator – Custom Photos and Audio

If you’re looking for a quick and easy way to create a video of your photos with custom audio, Slide.ly can do this. Here’s the rundown:

  •  Up to 90 custom images / photos
  • 1 audio / song  (to use multiple audio files / songs, edit and combine them first, e.g. using Audacity)
  • Add custom captions for each photo
  • Different themes
  • Player is HTML-based, not Flash-based.
  • Can make private
  • Can’t download video because the end result isn’t a video.
  • To make a video of your Slide.ly, record the screen. See instructions. Then upload to YouTube or Vimeo.

If you need something more powerful but still simple, try Wondershare Slideshow Builder.

Invest in Real Estate or Stock Market

Average rate of return:

ROI based on own money or borrowed money:

  • If you invest $100,000  in stocks, with a 10% ROI, you’ll get $10,000 in year 2.
  • If you invest $100,000 in real estate (20% of a $500,000 house), with a 10% ROI, you get $50,000. Your ROI is based on a lot of money you’ve borrowed from the bank, not just the initial deposit.

Read More

Fluid CSS Squares

Just 3 lines of CSS!

See the Pen KvwxXR by Abdullah Yahya (@javanigus) on CodePen.

JavaScript Text to Speech

Here’s an interesting demo of an ability to have a website speak text to you in different languages. It’s not bad!

https://code.responsivevoice.org/examples/example2.html

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 steak, e.g. 1.25 inches thick
  3. Smear 1.5 tablespoons of olive oil on both sides of meat
  4. 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)
  5. Put extra heavy duty aluminum foil on a baking sheet or a glass casserole dish (this will make cleanup easy)
  6. Put marinated meat on baking sheet / casserole dish
  7. Put oven rack about 3 to 4 inches from the top of the oven
  8. Turn on oven to “Broil” (only top has flames or heat) and preheat oven for 5 minutes
  9. Put in meat on the rack
  10. Set timer to cook 1st side
  11. When timer goes off, flip the meat and set timer to cook 2nd side.

Cooking times:

 

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.

Read More

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.

Read More

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