tinyapps.org / blog


Clone "Date modified" values without recopying files #

Problem: C:\A\ and C:\B\ contain the same files and folders, but the timestamps in C:\B\ are incorrect.

Solution: Mirror the file and folder timestamp values from C:\A\ to the same files and folders in C:\B\ (without having to recopy the files) via robocopy:

C:\>robocopy C:\A\ C:\B\ /E /DCOPY:T /COPY:T
...
               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :         3         0         3         0         0         0
   Files :        14        14         0         0         0         0
   Bytes :   3.339 g   3.339 g         0         0         0         0
   Times :   0:00:00   0:00:00                       0:00:00   0:00:00


   Speed :           239063077333 Bytes/sec.
...

robocopy's log is incorrect; no directories were skipped (all their timestamps were updated), no files were copied (only their timestamp data was), and the hardware wasn't quite up to 239GB/sec.

/windows | Jan 16, 2019

tree: hide control characters and display Japanese properly #

After installing tree in macOS (brew install tree), running it did not produce the expected results:

$ tree
.
└── 宮?\216駿
    ├── 1\ 風?\201?谷?\201??\203\212?\202??\202??\202?.iso
    ├── 2\ 天空?\201??\237\216?\203??\203\222?\202\232?\203??\202?.iso
...

Specifying the character set sadly did not avail, and saving results to a file seemingly exacerbated the problem:

$ tree --charset utf-8 -o list.txt

Partial view of file as it appeared it Sublime Text:

<0x1b>[01;34m.<0x1b>[00m
├── list.txt
└── <0x1b>[01;34må®®å´\216駿<0x1b>[00m
...

The solution was to use the -N ("Print non-printable characters as is") and -n ("Turn colorization off always", which hides the color control characters / ANSI escape codes) options:

$ tree -Nn
.
└── 宮崎駿
    ├── 1 風の谷のナウシカ.iso
    ├── 2 天空の城ラピュタ.iso
    ├── 3 となりのトトロ.iso
    ├── 4 魔女の宅急便.iso
    ├── 5 もののけ姫.iso
    └── 6 千と千尋の神隠し.iso

1 directory, 6 files

/mac | Jan 15, 2019

FastCopy: exclude directories and delete files unique to destination #

/windows | Jan 15, 2019

Veganism for the rational #

Thanks to the generous CC BY-NC-SA licensing, Colorado Reed's succinct Veganism: An engineer's perspective. is reproduced here verbatim:

Why are you vegan?

I've heard this question quite a bit in the last year and a half of my veganism. And, well, it's a difficult question to answer since my veganism stems from a deep range of materials and experiences: books, research papers, and documentaries, as well as conversations and self-experimentation.

But as an engineer, I aim to both understand my rationale for going vegan and simplify it into a set of logical statements. So, by coalescing my research and experiences, I've created a set of three simple statements (with supporting references) that represent the fundamental arguments that brought me to veganism:

Logically, from the above three points, it follows that consuming animal products is unnecessary and causes destruction to the environment as well as billions of sentient animals. And while I initially didn't fully understand this logic, the research discussed in the "Further discussion" section below led me to understand that veganism was a logical conclusion that I couldn't overlook.

∴ I do not consume animal products

Of course, there was also a part of me that had a lot of subjective thoughts/questions about veganism, and resources such as http://yvfi.ca helped me navigate these channels.

Further discussion:

The first three references and discussions here address the point "Humans can thrive on a vegan diet", the second three references and discussions address the point "Consuming animal products is one of the largest individual contributions to climate change," and the final two references and discussions address "Consuming animal products results in slaughtering ~75 billion sentient farm animals each year — animals that want to live."

  1. Position of the American Dietetic Association: vegetarian diets, (2009): "It is the position of the American Dietetic Association that appropriately planned vegetarian diets, including total vegetarian or vegan diets, are healthful, nutritionally adequate, and may provide health benefits in the prevention and treatment of certain diseases. Well-planned vegetarian diets are appropriate for individuals during all stages of the life cycle, including pregnancy, lactation, infancy, childhood, and adolescence, and for athletes."
  2. Health effects of vegan diets, Craig, W., The American Journal of Clinical Nutrition, (2009) From the summary: "Vegans are thinner, have lower serum cholesterol and blood pressure, and enjoy a lower risk of CVD. BMD and the risk of bone fracture may be a concern when there is an inadequate intake of calcium and vitamin D. Where available, calcium- and vitamin D–fortified foods should be regularly consumed. … Vegans generally have an adequate iron intake and do not experience anemia more frequently than others. Typically, vegans can avoid nutritional problems if appropriate food choices are made. Their health status appears to be at least as good as other vegetarians, such as lactoovovegetarians."
  3. Plant foods have a complete amino acid composition. McDougall, J., Circulation, (2002). This concise note from Dr. John McDougall provides a number of important references regarding the nutritional completeness of a plant-based diet, e.g. "Therefore, a careful look at the founding scientific research and some simple math prove it is impossible to design an amino acid–deficient diet based on the amounts of unprocessed starches and vegetables sufficient to meet the calorie needs of humans. Furthermore, mixing foods to make a complementary amino acid composition is unnecessary."
  4. Reducing food's environmental impacts through producers and consumers. Poore J. and Nemecek T. Science, (2018). If you're going to read just one paper on the relationship between our food and impact it has on our environment, let it be this one. This meta-study created a dataset based on prior research that spanned ~40,000 farms in 100+ countries and analyzed food production of 40 food products that comprise ~90% of consumed calories. It assessed the environmental expense of the entire production cycle for these foods, taking into account green house gas emissions, land use, [fresh]water use/pollution and air pollution. Example conclusion: meat and dairy provide 18% of calories and 37% of protein, but uses 83% of farmland and produces 60% of agriculture's greenhouse gas emissions.
  5. Analysis and valuation of the health and climate change cobenefits of dietary change. Springmann M. et al. PNAS (2016) "The food system is responsible for more than a quarter of all greenhouse gas (GHG) emissions, of which up to 80% are associated with livestock production. Reductions in meat consumption and other dietary changes would ease pressure on land use and reduce GHG emissions. Transitioning toward more plant-based diets that are in line with standard dietary guidelines could reduce global mortality by 6–10% and food-related greenhouse gas emissions by 29–70% compared with a reference scenario in 2050."
  6. The Impacts of Dietary Change on Greenhouse Gas Emissions, Land Use, Water Use, and Health: A Systematic Review. PloS one, Aleksandrowicz, L. et al., (2016). "Agriculture is responsible for up to 30% of anthropogenic greenhouse gas (GHG) emissions, about 70% of freshwater use, and occupies more than one-third of all potentially cultivatable land, with animal-based foods being particularly major contributors to these environmental changes"
  7. Food and Agriculture Organization of the United Nations. FAOSTAT Statistics Database. Accessed 2 Oct 2018. Worldwide, over 75 billion farm animals each year are slaughtered. Note that this does not include the marine life slaughtered for seafood. Statistics on wild caught marine life are only tabulated by the tonnes and do not include bycatch (catching and killing the wrong type of fish, e.g. sharks in a tuna net), so it is difficult to count the amount of marine life slaughtered for seafood. Some extrapolation of FAO data leads to an estimate in the range of 1–2.75 trillion: http://fishcount.org.uk/published/std/fishcountstudy.pdf. From the FAO data, there are ~300 million worldwide dairy cows that must be forcibly impregnated in order to produce milk (cows, like all mammals, only produce milk when pregnant), and ~5 billion egg laying hens.
  8. The Cambridge Declaration on Consciousness 2012. A group of prominent neuroscientists created The Cambridge Declaration on Consciousness, in which they state their support for the idea that animals are conscious and aware in a similar way as humans. "The absence of a neocortex does not appear to preclude an organism from experiencing affective states. Convergent evidence indicates that non-human animals have the neuroanatomical, neurochemical, and neurophysiological substrates of conscious states along with the capacity to exhibit intentional behaviors. Consequently, the weight of evidence indicates that humans are not unique in possessing the neurological substrates that generate consciousness. Non-human animals, including all mammals and birds, and many other creatures, including octopuses, also possess these neurological substrates."

/misc | Jan 13, 2019

Opening and searching large text files in iOS #

is instantaneous with iVim (GitHub page):

/misc | Jan 08, 2019

"Your account has been disabled in the App Store and iTunes." #

Attempting to download or purchase items in the iOS App Store suddenly began returning:

Your account has been disabled in the App Store and iTunes.
Your account has been disabled in the App Store and iTunes.

Testing in iTunes under macOS returned the same message, though with a thoughtful addendum:

Your account has been disabled in the App Store and iTunes. For assistance, contact iTunes Support.
Your account has been disabled in the App Store and iTunes. For assistance, contact iTunes Support.

Logging in via iCloud.com still worked, so next tried changing payment info via https://appleid.apple.com/account/manage > Payment & Shipping > Edit, sadly to no avail:

Payment information could not be updated. This Apple ID has been disabled, and cannot redeem codes.
Payment information could not be updated. This Apple ID has been disabled, and cannot redeem codes.

Called 1-800-MY-IPHONE. Transferred to "iTunes Support" (for which a direct number was not available, I was told (later discovered that https://getsupport.apple.com offers email, phone callback, and chat support for iTunes)). Instructed to click "Generate PIN" at the bottom of the https://applied.apple.com page and share it with the customer service rep, who kindly resolved the issue (which she said had been caused by the credit card having been replaced following a fraud alert).

/mac | Jan 02, 2019

3 book recommendations from Public Domain Day 2019 #

Sources: Duke University and The Public Domain Review

/misc | Jan 01, 2019

If you must run Windows 10... #

Heaven help you:

Barring divine intervention, Windows 10 Enterprise LTSC 2019 (formerly LTSB) may be the least bad option:

However, be aware that LTSC requires a volume license (VL) agreement, making onerous audits potentially more probable:

(despite Microsoft's own apparent need for a thorough inspection:

While five licenses are required to enter into a new VL agreement, they need not all be for LTSC. According to a rep I spoke with at a Microsoft Partner, this combination would work as an upgrade from a Windows OEM license (i.e., it would allow a user who bought a PC with Windows 10 preinstalled to run Windows 10 LTSC instead):

Here are links and prices from three well-known Microsoft Partners, though you should definitely confirm details with a rep before purchasing:

For those hapless souls stuck on Windows 10 Home or Pro, see:

Further reading:

/windows | Nov 30, 2018

Last chance to buy a proper MacBook #

Model Base Price Ports Keyboard SSD replace-able? Battery glued? MagSafe 2 Other
MacBook Air (13-inch, 2017) $999

Two USB 3 ports

One Thunderbolt 2 port

MagSafe 2 port

SDXC card slot

3.5 mm headphone jack

In retrospect, the best MacBook keyboard ever

Yes

Standard NVMe SSDs work beautifully via Sintech ST-NGFF2013C.

No Yes

Going back to my Macbook Air

MacBook Air. Apple’s best product ever

MacBook Air (Retina, 13-inch, 2018) $1199

Two Thunderbolt 3 (USB-C) ports

3.5 mm headphone jack

Worst. Keyboard. Ever.:

The New MacBook Keyboard is Ruining My Life

Unreliable MacBook Pro Keyboards

The 2018 MacBook Keyboards Have the Same Old Problems

Apple Engineers Its Own Downfall With the Macbook Pro Keyboard

An ode to Apple’s awful MacBook keyboard

No No, but must remove logic board to replace No:

Apple is killing off MagSafe, one of the MacBook's best features

Please Apple, don't kill MagSafe

Why oh why did Apple kill MagSafe?

Apple removed its safest, smartest invention ever from the new MacBook Pros

5 things we wish we could change with the new MacBook Air
MacBook (Retina, 12-inch, 2017) $1299

One USB-C port

3.5 mm headphone jack

No Yes Charge or plug in a peripheral!
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 Ports) $1299

Two Thunderbolt 3 (USB-C) ports

3.5 mm headphone jack

Only with a proprietary SSD Yes

Don't buy the MacBook Pros even on sale, in my opinion

MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports) $1799

Four Thunderbolt 3 (USB-C) ports

3.5 mm headphone jack

No Yes

No Esc or function keys

MacBook Pro? No

MacBook Pro board design flaw

/mac | Nov 19, 2018

MacBooks without batteries severely throttled #

/mac | Nov 15, 2018


Subscribe or visit the archives