Shell Tricks: list files with most text matches –

Filed in BSD, F/OSS, GNU Project, GNU/Linux, Gnu/Linux, OS X, Unix, Windows 10Tags: ,

Brett comes up with some good stuff. For example:

Here’s a Bash function for searching all text files in the current directory for a pattern, then listing the files containing matches in ascending order by number of matches. It’s mostly a proof of concept, but a useful companion to a basic grep search.

Source: Shell Tricks: list files with most text matches –

Check out the article for the full write up. It’s worth your time.

Read the rest of this entry »

Chrome 50 ends support for Windows XP, OS X 10.6, other old versions

Filed in BSD, F/OSS, GNU/Linux, OS X, Unix, WindowsTags:

Hot off the heals of my “For What Do I Use Google Chrome” post (by that, I mean I read it after I posted my article):

Chrome 50 ends support for Windows XP, OS X 10.6, other old versions:

Google Chrome version 50 was released to the browser’s stable channel yesterday, and in addition to a handful of new features and security fixes, the update also ends support for a wide range of operating systems that have been supported since Chrome launched on those platforms. Windows XP, Windows Vista, OS X 10.6, OS X 10.7, and OS X 10.8 are no longer supported.

This shouldn’t come as much of a surprise, since Google promised last November to end support for these older OS versions in April of 2016. Old versions of Chrome installed on these OSes won’t stop working (for now), but they’ll no longer receive updates and there’s no guarantee that things like Google account sign-in and data syncing will continue to work.


(Via Ars Technica)

Read the article on what to do if you’re still on one of these very old OS versions.

For What Do I Use Google Chrome?

Filed in BSD, F/OSS, GNU/Linux, Non-Free, WindowsTags: , , , ,

I’m rather particular about my web browser.

I’m an unabashed fan of Mozilla Firefox. Upcoming changes to the browser will trigger my move to alternate options, mostly because Firefox will lose the flexibility of their existing XUL engine making Firefox just like every other browser.

Perhaps ironically, those changes may move me to the default browser options of Safari on OS X and Edge on Windows 10 (note: nothing will move me to Internet Explorer as my daily driver). Gnu/Linux & BSD, depending on the desktop environment, may similarly dictate the browser I use.

Another of those options is Google Chrome (and to a lesser extent, the open Chromium browser where Chrome is unavailable).

I use Chrome today for precisely 3 things:

  1. Viewing PDF files in Windows (7-10)
  2. Visiting any site that relies on Adobe Flash on any platform
  3. Google Docs

The first two are, by far, the most important functions.

Until Windows 10 (I think) Microsoft didn’t include a way to view PDFs. Adobe Acrobat Reader was the standard choice, though other options – leaner, faster, and maybe more secure – exist. Microsoft Edge in Windows 10 as well as other apps can read PDFs. I’d rather open them with an application not deeply ingrained in the operating system.

As for Adobe Flash, I refuse to install it on any of my systems as of two years ago. Fewer and fewer sites rely on Flash, which is great. Yet every so often there’s some Internet real estate built on the weak Flash foundation I must visit. Chrome fills the need, again without opening up my OS any more than necessary.

I would be remiss if I failed to applaud Google in keeping these add-ins up-to-date and arguably more secure than Adobe.

Google Docs integration is a gimme.

What about you? How do you use Chrome to your advantage?

Advanced Power Management w/ Windows 10 (& Surface Pro 4)

Filed in Non-Free, Windows, Windows 10, Windows 7Tags: , , ,

Problem: Startup on my Surface Pro 4 takes too long. Once started, eats up too much battery and network.

Solution: Create tasks in place of startup files & registry entries, augmented by a script or two.

An ounce of prevention = a pound of cure. Which means this process sucks. Ideally, for each startup process you will only need to do this once.

This all kicked off when I read Delay Dropbox Startup in Windows. I knew on-line services like DropBox, Box, OneDrive, and Google Drive ate up battery and bandwidth. They also delayed startup.

Here’s the thing: while I rely on these services I don’t need them right away. In many cases I need to authenticate to a WiFi access point and establish a VPN connection before these services can even begin to help me.

Digging deeper, I found other programs keeping me from a working system and potentially draining my battery. Here’s what I’ve done:


  • CCleaner


  1. Launch Task Scheduler
  2. Launch Windows Task Manager.
    1. Go to the Startup tab.
    2. Sort by Startup Impact, then sort by Status. Focus on the items Enabled and High.
  3. Launch CCleaner. Go to Tools – Startup.
  4. For each item discovered in Task Manager above:
    1. In Task Scheduler:
      1. Create a new basic task
      2. Name it “My x”, where x is the name of the program. Click Next.
      3. Under Action, select “Start a Program”
    2. In CCleaner:
      1. Find the startup entry and right click on it, selecting “Open in RegEdit”
      2. Double click on the Name and copy the command line
    3. In Task Scheduler:
      1. Paste the command in the field
      2. When you get to the last tab, make sure “Open the Properties dialog for this task when I click Finish” is selected
      3. Click the Triggers tab and click Edit
      4. Check “Delay task for:” and enter the number of minutes you want it delayed. I recommend staggering OneDrive, Dropbox, Google Drive, and Box by a minute each.
      5. Click the conditions tab and select “Start the task only if the computer is on AC power”, “Stop if the computer switches to battery power”, and (if applicable) “Start only if the following network connection is available” with “Any connection” the option. NOTE: if you have a service you want running no matter the power or network, deselect all of these options.
      6. Select the Settings tab. Select “Run task as soon as possible after a scheduled start is missed”. Deselect “Stop the task if it runs for more than:” if a cloud service or something that you expect always running.
    4. In CCleaner:
      1. Disable the entry you just recreated as a task
  5. Reboot.
  6. Test.
  7. Tweak.
  8. Toggle power.
  9. Toggle network.
  10. Once things work as expected, modify the following script for your needs:

Get-ScheduledTask -TaskName "My*" | Where {$_.taskname -notmatch "My Emacs"} | Where {$_.taskname -notmatch "My F.lux"} | Where {$_.taskname -notmatch "My TouchMe Engine"} | Start-ScheduledTask

Save it to a file name you’ll remember (like ac.ps1) and place it in your path. This script is meant for triggering normal status when the device gets AC power restored. The three “where” statements above are for processes I don’t need to restart as they should remain running.

I expect to update this with refinements and improvements, so this is very much a work in progress. As always, Your Mileage May Vary. Proceed With Caution. While nothing here is destructive (enabling disabled startup entries in CCleaner and disabling the new task entries should restore things) make backups before you proceed.

Comments, questions, and such are welcome. Let me know how this works for you.

Super-efficient movement using avy | Pragmatic Emacs

Filed in EmacsTags:

More ivy/avy goodness …

One of the revelations I came to after a while of using emacs is that you can use searching (or swiping) to efficiently move to another place in the visible buffer. In other words, you can see the place that you want the cursor to be so you do a search for a word close to that position to move the cursor there – not because you want to find that word.

The package avy gives an even more efficient way to do this. There are a few options, but with the configuration below, I look at the place I want the cursor to be, hit M-s and type the first character of a word close to that position, and then the short string that appears in order to select the word that I want and the cursor jumps there. Once you get used to it, it almost feels like you can move the cursor just by looking where you want it to go!

Source: Super-efficient movement using avy | Pragmatic Emacs

Use ivy to open recent directories | Chen’s blog

Filed in EmacsTags:

I’m continuously amazed at what ivy can do …

The recent directories include parent directories of opened files in Emacs and the directories accessed in Bash shell.  I used fasd to get the list of directories in shell. Fasd “offers quick access to files and directories for POSIX shells”.

Source: Use ivy to open recent directories | Chen’s blog

How to Toggle the Mouse Locator on OS X, Windows

Filed in OS X, Windows, Windows 10, Windows 7Tags: ,

It’s easy to lose track of your mouse pointer in a large multiple display setup or when there’s no contrast between the screen background and the mouse pointer. It’s also a bit of a challenge if you use the wonderful Synergy project to share your keyboard and mouse between multiple computers. Here are some tips for enabling a way to find your mouse pointer.


HowTo Geek posted an explanation here. In short:

  1. Open System Preferences
  2. Click Accessibility
  3. Click Display
  4. Toward the bottom, make sure the option for “Shake mouse pointer to locate” is enabled

All one does at this point is wiggle or shake the mouse to find it’s location.

Windows 10 (maybe earlier versions as well)

  1. Hit the Windows key
  2. Search for Mouse Properties
  3. Scroll to the bottom and click “Additional Mouse Options”
  4. Under the Pointer Options tab, select “Show location of pointer when I press the CRTL key”

With this enabled, every time the Control key is pressed the mouse pointer is surrounded by quickly collapsing circles.

Both methods possess strengths and weaknesses. Your mileage may vary. I would like a combination – wiggle the mouse to find the pointer & if that fails, have a definitive keyboard approach.


puntoblogspot: programming quizzes with org-babel

Filed in Emacs, Org-ModeTags: , ,

Straightforward primer on using org-babel when programming:

… sometimes I want to give more context or write the code as a story, or a question-answer dialogue. In those occasions, org-babel is the way to go.

Source: puntoblogspot: programming quizzes with org-babel

Alex Schroeder: 2016-03-17 GPG Agent and Emacs

Filed in Emacs, OS XTags: , ,

Might prove useful if I end up with a Mac a work! Granted, it looks like mixed results. I trust a solution will be found.

In my Gmail Gnus GPG Guide I don’t mention gpg-agent because I never managed to set it up correctly for OSX.

Well, perhaps things will change. I followed the instructions on this blog post, I think, and it works on the command line. I can encrypt a text to myself, when I decrypt it, I’m asked for my passphrase, and when I decrypt it again, I’m not asked for my passphrase because the agent handles it.

Source: Alex Schroeder: 2016-03-17 GPG Agent and Emacs

Fix for Error Code 0x80070006 on Windows 10

Filed in Windows 10Tags: , , ,

Trying to upgrade or install applications from the Windows 10 Store failed with 0x80070006 error code. I couldn’t find a solution.

Previously, the same apps lost my account credentials.

“Hmmmm,” I said to myself. Poking and proding, I figured out the problem was caused by instability with my SD card because of Windows 10’s sleep problems.

I moved my apps back to the c: drive. That fixed the problem – so far, anyway.


Here’s what I emailed the Tweetium folks about this issue:

I think it’s a cascade problem with SP4 W10 sleep issues & installing apps to the non-system drive.

I had to hard cycle my SP4 a few times. It caused my D: drive to appear “unclean” to the OS. That’s where I installed my Windows Store apps.

I changed my power settings to hibernate on “lid close”.

Scanning the D: drive, both in Windows 10 and on the next reboot, made it so that apps worked – even Tweetium with my lost accounts. I moved said apps to the C: system drive. All is good.

BTW, another indicator of the problem is error 0x80070006 in Windows Store when upgrading or installing apps.

%d bloggers like this: