tinyapps.org / blog

Quickly scan a Windows host for known vulnerabilities #

with Windows Exploit Suggester - Next Generation (WES-NG):
WES-NG is a tool which based on the output of Windows' systeminfo utility provides you with the list of vulnerabilities the OS is vulnerable to, including any exploits for these vulnerabilities. Every Windows OS between Windows XP and Windows 10, including their Windows Server counterparts, is supported.
  1. wes.py --update
  2. systeminfo.exe > systeminfo.txt
  3. wes.py systeminfo.txt

/windows | Mar 03, 2019

Creating HTML or PDF contact sheets in macOS #

Automator's "New PDF Contact Sheet" action hung on a simple job, but it led to finding MakePDF.app hiding in "/System/Library/Image Capture/Automatic Tasks/" along with "Build Web Page.app":

/mac | Feb 20, 2019

Replace or recover domain cached credentials #

posted to the docs section.

/windows | Jan 29, 2019

Alternatives to dark mode extensions in Safari #

Unlike Content Blocker extensions like Wipr, dark mode extensions for Safari require extensive permissions (e.g., "Can read sensitive information from webpages, including passwords, phone numbers, and credit cards on all webpages" and "Can see when you visit all webpages").

Safer alternatives include:

/mac | Jan 24, 2019

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:

├── 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

Subscribe or visit the archives