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.
Author: Abdullah Yahya
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 (and Other Comparisons)
Average rate of return
- Stock Market: 10% (before inflation). 7% (after inflation)
- Real Estate: 10% (especially in the San Francisco Bay Area)
ROI based on own money or borrowed money
- If you invest $100,000 in stocks, with a 10% ROI, you’ll get $10,000 at the end of year one.
- If you invest $100,000 in real estate (20% of a $500,000 house), with a 10% ROI, you’ll get $50,000. Your ROI is based on the value of the property ($500K), not your $100K down payment. Most of your ROI comes from borrowing $400,000 from the bank.
Of course, you can also borrow $400,000 and dump it all into buying stocks but
- no one, especially a bank, would lend you $400,000 to invest in stocks, and even if they did, the interest rate would be more than 10%, causing you to lose money
- unless you invest in something like index funds, investing in individual stocks is more risky because their values can plummet in very short periods of time, e.g. Facebook dropped by 26.4% in just one day. A single-day devaluation like that would never happen in real estate. Real estate depreciation can occur, but it would take at least months.
Fluid CSS Squares
Just 3 lines of CSS!
See the Pen KvwxXR by Abdullah Yahya (@javanigus) on CodePen.
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: filter: contrast(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
- Buy steak meat (ribeye, new york,etc) (e.g. from Costco)
- Measure the thickness of the meat, e.g. 1.25 inches thick
- 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.
- Pat both sides of steak with paper towel to dry it as much as possible
- Smear 1.5 tablespoons of olive oil or melted butter on both sides of meat
- 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)
- 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.
- For a medium done steak, the internal temperature should be 135 degrees.
- When preheating is done (green light turns on), put the meat on the grill, close lid, and grill for 7 minutes.
- After 7 minutes, turn over on grill.
- 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.
- After 2 minutes, eat and enjoy
Notes from JS Conference Workshop: Extreme Web Performance
WPO
Optimization Comparison
Continue reading Notes from JS Conference Workshop: Extreme Web Performance
Notes from JS Conference Workshop: Mastering Chrome Developer Tools
JavaScript Debugging
Editing CSS
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