Craig Thrall

Previous | Page 2 of 13 | Next

usbip

Feb. 29, 2016, 5:49 p.m.

To get usbip to run on Ubuntu 14.04, use the script found here: https://launchpadlibrarian.net/106481975/make-usbip-userspace.sh

bokeh, matplotlib, and twinx

Feb. 9, 2016, 11:53 p.m.

The best way to have multiple Y ranges on a plot, and use Bokeh, is to not use matplotlib. The library that Bokeh uses does not translate the multiple ranges correctly. I found others with this issue. What worked for me is to skip matplotlib (I was lucky, this is new code), and "extra_y_ranges" to add additional Y ranges to my plot.

Computer Swap with Ubuntu

Oct. 26, 2015, 5:16 p.m.

If you swap a hard drive into a spare computer with identical hardware specs, remember the MAC address on your ethernet ports will be different. The OS will see them as new and rename them, and they will not match your configured device in /etc/network/interfaces. Before you swap the drive, delete any lines that exist in /etc/udev/rules.d/70-persistent-net.rules. The OS will add lines for the ethernet devices in the new computer. If you've already swapped the drive in, just delete the lines with the old device names, and rename the new renamed devices with the old device names.

Flycheck and C/C++

Sept. 24, 2015, 11:22 a.m.

I wanted to chain three different Flycheck checkers, and use the cppcheck "--enable=all" setting. Adding this to my Emacs init file did the trick: (add-hook 'after-init-hook #'global-flycheck-mode) (require 'flycheck-google-cpplint) (flycheck-add-next-checker 'c/c++-gcc '(error . c/c++-cppcheck)) (flycheck-add-next-checker 'c/c++-cppcheck '(error . c/c++-googlelint)) (custom-set-variables '(flycheck-cppcheck-checks "all"))

Compressing iPhone Videos

Aug. 27, 2015, 1:44 p.m.

I copied about ten videos from my iPhone 6, and wanted a way to compress them in format that could be played back on Windows without having to install a different codec. I also wanted to remove the audio. I ended up using this ffmpeg command in Linux: ffmpeg -i <input_filename> -vcodec msmpeg4v2 -an <output_filename>

VeloView on Ubuntu 14.04

Aug. 14, 2015, 10:47 p.m.

To get VeloView running on Ubuntu 14.04, make the following changes. 1. In liblas/src/liblas/src/classification.cpp, remove the #include for boost/cstdint.hpp, and add one for stdint.h. This fixes errors around uint64_t type definitions. 2. Change Superbuild/Projects/python.cmake by removing the "DEPENDS png" line. 3. Remove "png" from Superbuild/Projects/qt.make:7 (line starts with "list (APPEND"). 4. Remove "ParaView" as a package dependency if you get complaints about not finding FindParaView.cmake. 5. Fix other CMake issues, mostly by deleting dependencies. 6. Test by running Python and running "import paraview.simple". Fix PYTHONPATH and LD_LIBRARY_PATH as required.

How to Extract Contacts from an iPhone Backup

April 19, 2015, 4:02 p.m.

I have several iPhone backup files on my MacBook Pro. I wanted to get the contacts out of one of them, and onto an iPhone. I didn't want to restore an older backup, because I only wanted the contacts, and didn't want to lose data that had been added to the phone since the backup. The iPhone is synced to iCloud. Here's what I ended up doing. 1. I downloaded the "iPhone Backup Extractor" free app from here: http://supercrazyawesome.com. 2. I extracted "iOS Files" from the backup I wanted (there is also a free app out there called iPhone Backup Viewer that will let you look at the contents of your backup files). 3. I opened the Address Book SQLite database in SQLite Browser and ran a query to get the first name, last name, and multivalue value for the contact info I was interested in. Something like: select p.First, p.Last, v.value from ABPerson as p, ABMultiValue as v where v.record_id = p.ROWID and v.label in (1, 3, 5, 6, 7) and v.value is not null order by p.First 4. I copy/pasted the result into a LibreOffice spreadsheet, filtered out duplicate values, and copy/pasted into another sheet (if you filter then save the CSV, you'll also save all the filtered out data, which I didn't want). 5. I imported the CSV full of contacts into the Contacts app. When you import, it will automatically create a new group for you so you don't have to worry about mixing newly imported contacts with everything else. 6. I selected all the newly imported contacts and exported to a vCard. 7. I imported the vCard into iCloud, and after a couple minutes they got synced to the iPhone.

Converting Ogg to MP4 on Ubuntu

Dec. 2, 2014, 10:30 p.m.

First, install ffmpeg by running "apt-get install ffmpeg." Then, if you want to keep the audio, run "ffmpeg -i filename.ogv -c:v libx264 -ac 2 -ar 44100 filename.mp4." To mute audio for a screencast, use "ffmpeg -i filename.ogv -c:v libx264 -filter:a volume=0 filename.mp4."

Moxa UPort on Ubuntu 14.04

June 30, 2014, 3:54 p.m.

I've got a Moxa U1610 connected via USB to my Dell XPS Developer Edition laptop, which I've upgraded to Ubuntu 14.04 (kernel 3.13.0-29). The drivers on the Moxa site do not work with a kernel this new, nor do the beta drivers you can find floating around on the web. Here are the steps that worked for me: 1. Get the latest source for the kernel (I got mine from here: https://github.com/torvalds/linux/blob/master/drivers/usb/serial/mxuport.c) 2. Download the tarball for Ubuntu 14.04 and unpack it somewhere. 3. Copy the mxuport.c kernel module from the Linux source to the drivers/usb/serial directory in your copy of the Ubuntu source. 4. Run "make xconfig" or the equivalent in your copy of the Ubuntu distribution and make sure that kernel modules are enabled, and the mxuport kernel module is enabled. What I found easiest was running "make xconfig" and searching for "mxuport". 5. Save the configuration and run "make" from the top of your Ubuntu distribution. 6. When the build is done, copy mxuport.ko from the same Ubuntu drivers/usb/serial directory to your local /lib/modules/3.13.0-29-generic/misc directory. 7. Run depmod as root. 8. Run "modprobe mxuport" as root. 9. Run dmesg and confirm the module got loaded.

Booting Windows 8.1 Installer off USB

June 20, 2014, 10 p.m.

I was able to boot from a USB I created using UNetbootin (http://unetbootin.sourceforge.net) on my Mac. I used the USB stick to install Windows 8.1 on a Dell XPS 13. I didn't have to do anything after UNetbootin to get the USB drive to boot. Ubuntu 12.04 and Tuxboot did not create a bootable stick. I tried both the legacy and UEFI options on the Dell, but it's like the stick wasn't there. Once I tried UNetbootin on the Mac, the USB drive showed up automatically as a UEFI boot option.