Tuesday, September 6, 2016

git: Using the branches in a remote repository

This is more of a personal note -- something that I need to record in order to use git efficiently.

If you git clone a repository in (e.g. from GitHub), you generally end up on the 'master' or 'origin' branches, assuming that you accept the default nomenclature for referring to a remote repository. To show the other branches available to you:
git remote show [origin]
or
git ls-remote
To show you what you are currently tracking:
git branch -vv
You can then switch to one of the remote branches shown in ls-remote:
git checkout remote_branch
You may find that git warns you about untracked files that are present that may be overwritten by changing the branch.

Assuming you have a bunch of untracked files or cruft that you are certain that don't need and you want to discard:
git clean -d -fx ""
... and then you can proceed with the checkout.

Monday, September 5, 2016

This is what replacement nibs (tips) for the GT-N8013 look like

Nibs for the Galaxy Note 10.1 GT-N8013 (first edition, from 2013) are increasingly  hard to find. An Internet search turns up a lot of tips that look like they're incompatible -- and indeed, they probably are.

It turns out that the nibs for this particular model are straight: no curves, no blobs -- just a tube of plastic with a rounded tip. A #2 Philips is included for scale:


And yes, you can just yank them out of the pen barrel.

Friday, September 2, 2016

Building Python3 modules from FreeBSD ports

If you're like me, you will have python2.7 selected as the default interpreter in your TrueOS installation. However, some programs may require Python version 3 (and associated python3 modules). However, there aren't many py34 modules available using pkg install.

The solution to the problem is simple if you have a FreeBSD ports tree installed.

To build a port for a specific version of python, execute:
PYTHON_VERSION=pythonX.X make
Substitute X.X for the appropriate version that you require. Instead of the default py27-modulename, FreeBSD will build pyXX-modulename.

The default, of course, can be changed in make.conf (see man make.conf for details.)