Alternatives for clang

October 21st, 2016 No comments

In Ubuntu, installing clang-3.6 doesn’t provide you with clang or clang++ links to the clang-3.6 or clang++-3.6 executables, or a way of easily selecting the active clang version when you have multiple versions installed.

This command/script creates a clang group using update-alternatives so you can easily execute clang (without the version number) and switch between different clang versions.

Categories: Uncategorized Tags:

US Patent: Phone call management based on presence of nearby people

October 4th, 2016 No comments

us009451072

Abstract

A phone call is made from an initiator phone to a receiver phone. The receiver phone determines how many people are near the receiver phone, and generates a response based on how many people are near the receiver phone. This response can be, for example, a message that is sent to the initiator phone and can be displayed at the initiator phone, indicating either that no one is near the receiver phone or that multiple people are near the receiver phone. The number of people that are near the receiver phone is monitored, and when just one person near the receiver phone is detected, various different actions can be taken. A message can be sent for display at the initiator phone indicating that there is only one person near the receiver phone, or the receiver phone can prompt the user to call back the initiator phone.

The PDF version is here.

Categories: Uncategorized Tags:

US Patent: Low power management of multiple sensor integrated chip architecture

October 4th, 2016 No comments

us009354722

Abstract

A method, device, system, or article of manufacture is provided for low-power management of multiple sensor chip architecture. In one embodiment, a method comprises, at a computing device that includes a first processor, a second processor and a third processor, receiving, by the first processor operating at a first clock rate, first sensor data from a first sensor operating at a first data rate; determining, by the first processor, a movement of the computing device using the first sensor data; in response to determining the movement of the computing device, performing, by the first processor, a first motion state algorithm to determine whether a modality of the computing device is a first motion state; and, in response to determining that the modality of the computing device is not the first motion state, changing, by the first processor, at least one of the first processor to operate at a second clock rate sufficient to perform a second motion state algorithm and changing the first sensor to operate at a second data rate sufficient to perform the second motion state algorithm, wherein the second motion state algorithm is used to determine whether the modality of the computing device is a second motion state.

The PDF version is here.

Categories: Uncategorized Tags:

Import Tellico books into Calibre

April 23rd, 2016 No comments

I used to maintain my dead-tree book collection in Alexandria. When that stopped being developed I switched to Tellico. Tellico however doesn’t have a simple way of retrieving cover images, so recently I switched to using Calibre.

The following python script automates the process of converting from Tellico to Calibre so you don’t have to re-enter all the books by hand.

Install requirements (BeautifulSoup v4 is used to parse the XML):

sudo apt-get install python-bs4

Extract the Tellico data (the Tellico file (*.tc) is just a zip file with the XML data and cover images):

mkdir /tmp/tellico
cd /tmp/tellico
unzip [/path/to/tellico/file/MyBookLibrary.tc]

Now run the import/conversion script. The only argument it needs is the path to the tellico.xml file that you just unzipped:

python Tellico2Calibre.py tellico.xml

All the books are tagged with “Print”, and if they’re marked as loaned out in Tellico they also get the “Loaned” tag. The following data is imported:

  • Title
  • Authors
  • ISBN
  • Cover image
  • Publisher
  • Published date
  • Comments
  • Rating

Categories: Uncategorized Tags:

Vim Syntax Highlighting for Firewall Logs

January 6th, 2016 No comments

Firewall logs are verbose, and utterly boring to look at. It’s hard to pick out the important parts, like what the IP or destination port was. If you use vim/gvim to view the logs, there’s a syntax file I put together to make them more readable. Get it from https://github.com/gburca/vim-firewall

Here’s a before/after image (click for the full size):

Vim syntax highlighting for firewall logs.

Vim syntax highlighting for firewall logs.

Categories: Uncategorized Tags: