Saturday, June 18, 2016

Checking out a remote branch (that does not exist locally) in Git

$ git branch -a -v
* master                           f81a844 ~ ensures bin/factorrs works on Windows
  remotes/origin/HEAD              -> origin/master
  remotes/origin/coalescing-common ad0cc13 bin/find_unused_header_files : + uses libCLImate and provides standard and custom flags
  remotes/origin/master            f81a844 ~ ensures bin/factorrs works on Windows


$ git checkout -b coalescing-common origin/coalescing-common
Branch coalescing-common set up to track remote branch coalescing-common from origin.
Switched to a new branch 'coalescing-common'


git branch -a -v
* coalescing-common                ad0cc13 bin/find_unused_header_files : + uses libCLImate and provides standard and custom flags
  master                           f81a844 ~ ensures bin/factorrs works on Windows
  remotes/origin/HEAD              -> origin/master
  remotes/origin/coalescing-common ad0cc13 bin/find_unused_header_files : + uses libCLImate and provides standard and custom flags
  remotes/origin/master            f81a844 ~ ensures bin/factorrs works on Windows


Thursday, September 17, 2015

Recovering from BRICK iPhone with iOS 9

In a flush of recklessness, I decided to upgrade my iPhone 5s (7.x) in order to try to resolve some of the iTunes <-> Music update issues I was having (missing and duplicated songs).

Knowing that 8.4.1 has been around and working for a while, I went ahead. Little did I know that 9 was just released. Long story short: all goes well until "Slide to upgrade" then death. No amount of messing around helped.

Fix was to follow Hardeep Singh's advice here. Remember to press Option key

Thanks, Hardeep!

OS X Mavericks loss of (Bluetooth) mouse after update

Delete /Library/Preferences/com.apple.Bluetooth.plist. That's it.

Got the tip from here.

Thursday, November 24, 2011

Ubuntu 11 on VMWare Server install failure workaround

I've tried several times to install Ubuntu 11.10 on VMWare Server, always having it fail at the first (maybe second?) hurdle of failing to acquire 4.4 GB of hard drive space. On a whim, I elected to create IDE rather than SCSI (virtual) drives, and it works!

Monday, January 24, 2011

Installing log4cxx with Visual C++

This post describes how to download and build log4cxx for Visual C++. The following steps assume that you do not have the Platform SDK (2003+) installed. If you do, some steps - noted as "not necessary if you have Platform SDK (2003+) installed" - are not necessary.

Download:
  1. Download log4cxx from http://logging.apache.org/log4cxx/download.html. I downloaded apache-log4cxx-0.10.0.zip.
  2. Download APR (Apache Portable Runtime) from http://apr.apache.org/download.cgi. I downloaded apr-1.4.2-win32.zip.
  3. Download APR-Util from http://apr.apache.org/download.cgi. I downloaded apr-util-1.3.10-win32.zip.
Install:
  1. Unzip each archive under C:\3pty, resulting in directories C:\3pty\apache-log4cxx-0.10.0, C:\3pty\apr-1.4.2, and C:\3pty\apr-util-1.3.10.
  2. The log4cxx Visual Studio projects assume peer directories named apr and apr-util, so the version-specific directories must be copied (or renamed) accordingly. I choose to copy, in case I need to revert.
  3. Copy directory C:\3pty\apr-1.4.2 to C:\3pty\apr, by issuing command: C:\3pty>xcopy /E /I apr-1.4.2 apr
  4. Copy directory C:\3pty\apr-1.4.2 to C:\3pty\apr, by issuing command: C:\3pty>xcopy /E /I apr-util-1.3.10 apr-util
Customise:
  1. Edit C:\3pty\apr-util\include\apu.hw, changing two lines:
    • The line containing #define APU_HAVE_ODBC 1 is changed to #define APU_HAVE_ODBC 0. NOTE: this step is not necessary if you have Platform SDK (2003+) installed.
    • The line containing #define APU_HAVE_APR_ICONV 1 is changed to #define APU_HAVE_APR_ICONV 0.
  2. Edit C:\3pty\apr-util\include\apr_ldap.hw, changing one line:
    • The line containing #define APU_HAS_LDAP 1 is changed to #define APU_HAS_LDAP 0.
  3. Open C:\3pty\apache-log4cxx-0.10.0\projects\log4cxx.dsw, navigate into the aprutil project, into the dbd folder, and select the apr_dbd_odbc.c file. Open the settings for this file (right-click Settings, or press Alt-F7), select the General tab, and check Exclude file from build. Do this for all configurations. NOTE: this step is not necessary if you have Platform SDK (2003+) installed. Close Visual Studio.
  4. At the project root level - in C:\3pty\apache-log4cxx-0.10.0 - execute the command configure. Do not execute the command configure-aprutil, unless you're working within cygwin.
Build:
  1. Open C:\3pty\apache-log4cxx-0.10.0\projects\log4cxx.dsw, select Batch Build from the Build menu, then check the bottom two options log4cxx - Win32 Debug and log4cxx - Win32 Release, and press the Build button. There'll be a bunch of warnings, but at the end you should find it has built the DLLs C:\3pty\apache-log4cxx-0.10.0\projects\debug\log4cxx.dll and C:\3pty\apache-log4cxx-0.10.0\projects\release\log4cxx.dll.

Thursday, January 6, 2011

Installing Digital Mars C/C++ compiler on Windows

This post describes how to download and configure the Digital Mars C/C++ compiler (DMC++) for Windows.
  1. Download DMC++ from http://ftp.digitalmars.com/Digital_Mars_C++/Patch/dm852c.zip.
  2. Unzip into C:\Programs\dm\Compilers\dm852, creating the directory compiler suite root directory C:\Programs\dm\Compilers\dm852\dm.
  3. Download  STLport 4.5.3 from http://ftp.digitalmars.com/Digital_Mars_C++/STL/stlport.zip
  4. Unzip into C:\Programs\dm\Compilers\dm852, overwriting any files for which you're prompted
  5. Edit C:\Programs\dm\Compilers\dm852\dm\bin\sc.ini, changing the line
        INCLUDE="%@P%\..\include";"%@P%\..\mfc\include";%INCLUDE%
    to
        INCLUDE="%@P%\..\stlport\stlport";"%@P%\..\include";"%@P%\..\mfc\include";%INCLUDE%

Tuesday, September 21, 2010

Adding yourself to sudo on Red Hat

First, you need to change to be root:

> su
Password:

Second, edit the sudoers file with visudo:

> /usr/sbin/viduso

Then add the following line (substituting your user name for matthew):

    matthew    ALL=(ALL) ALL

Finally, log out and back in again.