ffmpeg bash loop filenames truncated


When using ffmpeg in a loop to operate on many files, the filename variable may become truncated (usually from the front) because of the way ffmpeg handles EOF processing.


ls "${DIR}" | while read FILE; do
    ffmpeg -i "${FILE}" "${OUTPUT}"

In this case, after the first iteration of the loop, the $FILE variable containing the name of the second file will be truncated, resulting in a file not found error at best.

Python HTTPS requests - disable SSL verification

When using Python to implement certain REST APIs (like for SugarCRM, for example), if the development server is using a SSL certificate that is self-signed or otherwise untrusted, it may be necessary to disable the SSL verification as part of the request.

In my case, I was using the sugarcrm 0.1 wrapper and I had to edit the sugarcrm.py library file.

Bring back Windows Defender scanning in the right-click menu (Windows 8.1)

Windows Defender isn't necessarily the best A/V scanner, but it's free and built-in to Windows. Sometimes it can be difficult to use it in order to scan just a specific folder or file, however. This tip adds a "Defender Scan" option to the Send To submenu of the right-click context menu.

Add a plain text file called "Defender Scan.cmd" to the folder "C:\Users\username\AppData\Roaming\Microsoft\Windows\SendTo"

AppData is normally hidden but simply typing the path into Windows Explorer should work.

The contents of the file should be as follows:

Get mouse wheel tilts to go foward/back in Ubuntu 14.04

Upon installing Ubuntu 14.04, I noticed that tilting the wheel of my Logitech VX Nano had no effect on the browser back/forward functions like I had set up in Windows via Logitech SetPoint.

To resolve, set up imwheel

Getting started with Unprivileged Linux Containers in Ubuntu 14.04

People familiar with Solaris 10 or AIX 7 and later will know that it is possible run additional sub-instances of the operating system, called Zones and WPARs, respectively. The idea is to have a single kernel managing the process table and I/O in such a way that certain elements are tagged and sectioned off, similar to a chroot jail. The difference is that a Solaris Zone or WPAR appears to operate as a completely separate OS instance that can be restricted by resource controls applied in the "global" OS.

Enter Linux Containers (aka LXC). Developers of the OpenVZ project have contributed much of their work to the upstream Linux kernel and with Ubuntu 14.04 (LTS) Trusty Tahr, Linux Containers 1.0 has been made available to a mainstream Linux server distribution.

ZFS Module Errors on Ubuntu Server Upgrade


If you are using ppa:zfs-native/stable while upgrading from Ubuntu Server 13.10 to 14.04, you may encounter the following error:

run-parts: executing /etc/kernel/header_postinst.d/dkms 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
configure: error:
        *** Please make sure the kmod spl devel <kernel> package for your
        *** distribution is installed then try again.  If that fails you
        *** can specify the location of the spl objects with the
        *** '--with-spl-obj=PATH' option.
Error! Bad return status for module build on kernel: 3.13.0-24-generic (x86_64)
Consult /var/lib/dkms/zfs/0.6.2/build/make.log for more information.

Verizon HTC One (m8) Enable Power Saving Mode (requires s-off & root)

Get a root shell with ADB

adb.exe shell
[email protected]:~ $ su -

Navigate to the settings app and make a backup

[email protected]:~ # cd /data/data/com.android.providers.settings/databases
[email protected]:/data/data/com.android.providers.settings/databases # cp -p settings.db \

Open the settings database with sqlite3

Windows 8 HTC One Sync Manager No Phone Connected


After installing HTC Sync Manager on Windows 8 or 8.1 in order to manage your shiny new HTC One (m8) as I did, Sync Manager may show "no phone connected" despite the phone showing up in Windows Explorer.


Navigate to the C:\Program Files (x86)\HTC\HTC Driver\Driver Files\Win8_x64 directory, right click on androidusb.INF, and choose "Install". You may need to reboot but in my case HTC Sync Manager started working right away.

Windows 8.1 Does Not Go To Sleep

I bought a refurbished ASUS UX31a Ultrabook with Windows 8 preinstalled, then upgraded it to Windows 8.1. I don't remember testing it under Windows 8, but at least under 8.1 the laptop would not go to sleep automatically if Wi-Fi was enabled.

After trying dozens of suggestions from all around the Internet (to name a few: disable IPv6, disable homegroups, update Wi-Fi drivers, add wake exceptions with powercfg, etc. etc.), it turns out the solution was to wait for Microsoft to fix it. See http://support.microsoft.com/kb/2921066

Cygwin 64-bit ssh unable to set id_rsa permissions


When setting up ssh keys with ssh-keygen on Cygwin (x86 or x64) on Windows 8.1, the default permissions of the id_rsa file are too open to be used

Permissions 0660 for '/home/Brent/.ssh/id_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /home/Brent/.ssh/id_rsa


Subscribe to brentingitup.com RSS