ffmpeg to create timelapse video from images

This is the best tool I found. Much faster and much easier to use on Mac. I’ve tried iMovie and it’s ok but it’s not as fast (too many steps and processes). Here is a one-liner that works for me all the time:

ffmpeg -r 4 -pattern_type glob -i “*.JPG” -s 1280×720 -pix_fmt yuv420p timelapse.mp4

Plants 2018

  1. Red Cherokee Crape Myrtle (Lowes, 50% off, $30)
  2. Camellia japonica ‘In the Pink’ ($5, from $13, Lowes, x4)
  3. Camellia japonica ‘Korean Fire’
  4. Camellia japonica ‘Jordan Pride’
  5. Camellia japonica ‘Kramer’s supreme’
  6. Pluot Flavor Grenade (Payless, $20)
  7. Red currant ‘Red lake’ (Payless, $5)
  8. Pluot Dapple Supreme (Payless, $20 clearance, Jan 21, 2018)
  9. Cherry Van (Payless, $20 clearance, Jan 21, 2018)
  10. Cherry 6GM25 (Royal Crimson) (Payless, $20 clearance, Jan 21, 2018)
  11. Jujube Shanxi Li (Payless, $20 clearance, Jan 21, 2018)
  12. Apricot Tomcot (Payless, $20 clearance, Jan 21, 2018)
  13. Pear Shinseki (Costco $15 bareroot – Jan 22, 2018)
  14. Nectarine Flavortop (Costco $15 bareroot – Jan 22, 2018)
  15. Plumcot Unknown-Variety (Lowes Jan 26, 2018, bareroot, $20, regular price)
  16. Passion Fruit Frederick (Capitol Farmer Market, $30, Jan 31)
  17. Pluot Dapple Dandy (Payless, $20, Feb 1)
  18. Blackberry Black Satin (Payless, $11, Feb 1)

Succulents

  1. Cotyledon tomentosa – Bear’s Paw variegated (Lowes, $1 clearance)
  2. From Maggie ($11 in total, cheap! Fisher nursery in Morgan Hill)
    – Cryptanthus or Earth Stars (Cryptanthus bivittatus pink) x1
    – Haworthia coarctata
    – Sansevieria x1
    – Gasteria

Bought from a local guy in Morgan Hill on Craigslist 6x 275G IBC totes for $225 (original price $50/tote, bulk volume deal down to $37.5/tote). And I used to buy $100/tote. What a deal eh! 🙂

 

Solar stuff

Power power usage of some USB devices:

– Blink Module: 0.1amp (0.46 watt @5V)
– Cell phone charging (Moto G4): around 1 – 1.5amp
– Yi Camera: 0.25amp
– Amazon Echo dot:
– Google mini: 0.25amp
– Wifi hotspot Dlink DWR330: 0.25amp

4x 6-volt battery config:

– Sizing panel + battery: charging rate 10% (rule of thumb 5% to 13%)
225Ah x 2 x 12V x 10% x 1.2 = 648W
– Usage: 1 hotspot, 2 cameras, 1 blink module

 

 

Llagas Well Pump: – installed 11/14/2012

  • Grundflos 16S10-10
  • Motor: Franklin Electric 4″ 650Lb thrust
  • 9Amps, 1HP, 230V, 1 phase, 3 wire
  • 20GPM
  • Pressure tank: Flexcon IC266, switch 40 psi cut-in, 60 psi cut-out
  • Well: 5″ inside diameter, 300′ depth, depth of standing water: 48′, pump setting: 160′, drop pipe size: 1.25 sch 80 PVC w/ SS couplings, wire: #10 flat jacket w/ ground

San Martin, Morgan Hill – Creek Water and Rain Level

Webcam

Rainfall Level

Creek Water Level

Engine Oil – Automobile Car Specs

For my cars so I don’t have to keep looking up the docs:

Honda Civic 2016 (10th Gen)
– 0W-20
– 3.4 US qt (3.2 liters) oil change only
– 3.7 US qt (3.5 liters) oil change with filter

Honda Odyssey 2011
– 0W-20 (w/ filter: 4.5 qt, 4.3L, w/o filter: 4.2qt, 4L)
– Coolant: Honda Long-Life Anti-freeze/Coolant Type 2 (or temp for non-silicate for aluminum engines). 1.93G (7.3L)
– ATF: Honda ATF DW-1 (3.3qt)
– Brake: Honda Heavy Duty Brake Fluid DOT 3
– Steering Fluid: Honda Power Steering Fluid
– Windshield washer: 2.6qt

Toyota Tacoma 2005 (2.7L 4cyl, Base trim, automatic, 2TR-FE engine)
– Spark plug (DENSO: SK20HR11), plug gap: 1.1mm (0.043in)
– Oil 5W-30, with filter (5.8L / 6.1qt), without filter (5.1L, 5.4qt)
– Coolant: Toyota Super Long Life Coolant (8.6L / 9.1qt)
– Transmission fluid: ATF Type T-IV, (2L / 2.1qt)
– Differential oil: 3.31L / 3.5qt, API GL-5, SAE 90, 80W-90
– Steering: Dextron II or III

WKWebView Example

Reference:
https://developer.apple.com/reference/webkit/wkwebview

Sample Code:

import UIKit
import WebKit

class ViewController: UIViewController , WKNavigationDelegate {

var webView : WKWebView!

override func viewDidLoad() {
  super.viewDidLoad()

  let adreq = "https://g.adspeed.net/ad.php?do=html&zid=xxxx"
  let url = NSURL(string: adreq)
  let request = NSURLRequest(URL: url!)

  webView = WKWebView(frame: self.view.frame)
  webView.navigationDelegate = self
  webView.loadRequest(request)

  self.view.addSubview(webView)
  self.view.sendSubviewToBack(webView)
}

override func didReceiveMemoryWarning() {
  super.didReceiveMemoryWarning()
}

// WKNavigationDelegate

func webView(webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: NSError) {
  print(error.localizedDescription)
}
func webView(webView: WKWebView, didStartProvisionalNavigation navigation: WKNavigation!) {
  print("Loading")
}
func webView(webView: WKWebView, didFinishNavigation navigation: WKNavigation!) {
  print("Loaded")
}

}

Optimization with foreach() an empty array

<?php
$vResult = array();
$vAry = array(‘abc’);
$vLimit = 10000000;

$vStart = microtime(true);
for ($i=1;$i<$vLimit; $i++) {
foreach ($vAry as $a) {}
} // rof
$vResult[] = “NoEmptyCheck= “.(microtime(true)-$vStart);

$vStart = microtime(true);
for ($i=1;$i<$vLimit; $i++) {
if (!empty($vAry)) {
foreach ($vAry as $a) {}
}
} // rof
$vResult[] = “WithEmptyCheck= “.(microtime(true)-$vStart);

echo implode(“\n”,$vResult).”\n”;

/* Result

For an often-non-empty array scenario:
NoEmptyCheck= 2.10900402069
WithEmptyCheck= 2.59749412537

For an often-empty array scenario:
– NoEmptyCheck= 1.08695101738
– WithEmptyCheck= 1.01621007919

*/

?>

Optimization with in_array()

Ever wonder with many in_array() checks, you can speed it up depending on your scenario. In my case, 99% it’s empty so it’s better with an empty() check

<?php
$vResult = array();
$vAry = array();
$vLimit = 10000000;

$vStart = microtime(true);
for ($i=1;$i<$vLimit; $i++) {
if (in_array(123,$vAry)) {
}
} // rof
$vResult[] = “NoEmptyCheck= “.(microtime(true)-$vStart);

$vStart = microtime(true);
for ($i=1;$i<$vLimit; $i++) {
if (!empty($vAry) && in_array(123,$vAry)) {
}
} // rof
$vResult[] = “WithEmptyCheck= “.(microtime(true)-$vStart);

echo implode(“\n”,$vResult).”\n”;

/* Result

For an often-non-empty array scenario:
– NoEmptyCheck= 3.76290512085
– WithEmptyCheck= 4.59545087814

For an often-empty array scenario:
– NoEmptyCheck= 3.46415710449
– WithEmptyCheck= 1.08467411995

*/

?>

Planter Clearance @ Lowe’s

Got a bunch of outdoor plastic planters on sales at Lowes.com: 9x 22″ red $4, colorful 21″ ones for $5, some cilantro color for $3.11.

Garden Treasures 11.42-in H x 14.61-in W x 14.61-in D Green Brushed Indoor/Outdoor Planter $3.75
Item #: 485048 | Model #: P13011511241CG

Garden Treasures 14.45-in H x 17.2-in W x 17.2-in D Blue Brushed Indoor/Outdoor Planter $5
Item #: 485043 | Model #: P13011811242B

14-in H x 16-in W x 16-in D Navy Indoor/Outdoor Planter $2.49
Item #: 555919 | Model #: SN1606DB
14-in H x 16-in W x 16-in D Emerald Indoor/Outdoor Planter $2.49
Item #: 555921 | Model #: SN1606ED

10.5-in H x 12-in W x 12-in D Red Indoor/Outdoor Planter $1.49
Item #: 555907 | Model #: SN1212RD

10.5-in H x 12-in W x 12-in D Navy Indoor/Outdoor Planter $0.5
Item #: 555911 | Model #: SN1212DB

10.5-in H x 12-in W x 12-in D Emerald Indoor/Outdoor Planter $0.5
Item #: 555913 | Model #: SN1212ED

Some future predictions

WhatsApp sold for 19B! SMS has changed. Communication has changed. Everything is coming back to data and telcos only has Internet/data plan to charge. Before they have voice (long distance, international), text, data. Now it’s only data that matters.

I see these as hot: Data Compression and Caching/Optimization as they become more and more important to reduce the bandwidth while delivering more. Serve more with less.