If you haven’t heard of
tac, it’s a pretty nifty command-line utility that ships with the GNU utils and it’s used to print a file backwards, line-by-line. It’s especially useful when analyzing things like log files, and judicious use of
tac can speed up commands considerably.
Take the example of a 30GiB webserver access log and you want to see the last request to a certain resource or that triggered a particular HTTP status code. You could run the following to get the last such request… which would take quite awhile on anything larger than a few hundred MiB:
> egrep "GET /path/to/resource " access.log | tail -n1
Or you could be smart about it and use
tac instead, and not even have time to blink before the result comes back:
> tac access.log | egrep "GET /path/to/resource " | head -n1
If you’re still stuck on .NET 2.0, 3.0, or 3.5 for any reason and don’t have access to the
.CopyTo method for
System.IO.Stream objects, the
Stream.CopyTo extension method, available as a small NuGet package will make manually allocating buffers and other boilerplate associated with copying a buffer from one stream to another a thing of the past.
Just a quick heads-up for all our readers: our recently released RunInBash utility – which makes mixing-and-matching PowerShell/Windows/CMD commands with WSL/Linux/Ubuntu commands under Windows 10 as easy as prefixing WSL commands with
$ to execute them from within a command prompt or PowerShell terminal – is now available under Chocolatey.
If you have any skin invested in the high-performance computing game, you’ve almost certainly heard of the likes of MMX and SSE, the original “extensions” to the x86 assembly instruction set that provided task-specific performance-optimized instructions that let developers take advantage of specific hardware extensions to quickly perform tasks that previously required extra steps in software to compute. If you haven’t, here’s a quick briefer.
The “basic” instructions supported by PCs are known as the “x86 assembly language” and is the lowest level of code available for writing software that runs on a “regular PC,” originally developed by Intel and adopted by other players in the CPU game (including AMD and the now-defunct Via CPUs). All PCs from the original Intel 8086 way back in 1978 to modern, multi-core behemoths support this language, and code written in or compiled for x86 can (in theory) run on any machine from 1978 onwards.
Hello international users of EWS! We’re really happy to announce the immediate availability of Easy Window Switcher 1.1.0, which brings support for internationalized keyboards to EWS users worldwide!
For those that haven’t been keeping in touch, Easy Window Switcher is a nifty, tiny utility that boosts your productivity by adding the ability to “alt-tab” between windows of the same application only, with the keyboard combination alt` (on US keyboards), a shortcut that should be intimately familiar to anyone that’s used OS X for any length of time.
From the “they clearly didn’t think this one through” department,1 comes news of the federal government’s new ban on “electronic devices larger than a cellphone” from eight Muslim-majority countries, ostensibly to defend against in-air terror attacks that could somehow come via a device that’s been x-rayed and powered on to ensure it works. But what’s a cell phone and how big is too big?
We’ve just released the inevitable bugfix build for any product launch with Easy Window Switcher 1.0.1, which adds the ability to cycle between maximized windows. Hat-tip to Chris Bollman for reporting this bug.
Upgrading EWS is very straight-forward, as soon as you download and run the new version of EWS, you’ll see a dialog like the following:
Today, while browsing the internet and looking at some “old” guides from 2012 I came across a familiar sight: a forum thread with hundreds of inline images, all of them once hosted with ImageShack, now permanently inaccessible. For those of you too green to remember, ImageShack and PhotoBucket were the Imgurs of yesteryear. Free photo/image hosting/sharing services that stepped in to fill the void when users needed to share pics on sites that didn’t offer image uploading/hosting themselves.
Today, it is far more likely that users recognize the names of once-behemoths PhotoBucket or ImageShack not from their years of glory but from coming across images like this, the fossils that remain from the time when these two beasts ruled the image hosting world and roamed the interwebs unopposed:1
Lenovo’s ThinkPad T570, the much-awaited, supposed MacBook killer that was first announced at CES in January, is now available for pre-order via Lenovo Hong Kong – meaning users can finally see what specs are available and (roughly) how much it’s going to cost them.
Let’s get this out of the way: disappointingly, once again, Lenovo doesn’t seem to have made available configuration options that feature Intel’s fastest mobile chips; the most powerful option available is the Kaby Lake-powered i7-7600U. This is almost certainly a conscious and thought-out decision, as 7600U is the highest you can go without a massive jump in TDP – the higher-spec’d 7700HQ and above all weigh in at 45W TDP, compared to the 7600U’s thrifty 25W TDP. Dell’s Precision (and possibly XPS15?) and HP’s ZBook lineups will likely be the only way to get more raw processing power for your next purchase – at the cost of greatly-reduced battery life, no doubt.