The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,262 other subscribers

Archive for May 11th, 2017

$59 HDFury Universal PSU Doctor Supports Power Monitoring via iOS or Android

Posted by jpluimers on 2017/05/11

Interesting device [WayBack]: $59 HDFury Universal PSU Doctor Supports Power Monitoring via iOS or Android which has a lot more details.

Via: [WayBack] +HDfury has launched a 3-port USB charger/power supply with power monitoring function. – Jean-Luc Aufranc – Google+

–jeroen

Posted in Android Devices, Apple, Development, Hardware Development, Hardware Interfacing, iOS, Power User, USB | Leave a Comment »

git encoding trouble: recursively removing a directory where git prints out a different name than it accepts

Posted by jpluimers on 2017/05/11

The story so far:

A few years back I put all my conferences material in a GitHub repository https://github.com/jpluimers/Conferences/. There were a lot directories and files so I didn’t pay much attention to the initial check-in list. The files had been part of copy.com syncing between Windows and Mac machines.

Often git on a Mac is a bit easier than on Windows (on a Mac you can install them with the xcode-select --install trick which installs only the Command Line Tools without having to install the full Xcode [WayBack]).

I choose a Mac because it is closer to a Linux machine than Widows so I expected no encoding trouble (as git has a Linux origin: it “was created by Linus Torvalds in 2005 for development of the Linux kernel“).

Boy I was wrong:

Recently I cloned the repository in a different place and found out a few strange things:

  1. Directories with accented characters had been duplicated, for instance in https://github.com/jpluimers/Conferences/tree/master/2011
    1. …/EKON15-Renaissance-Hotel-D%FCsseldorf
    2. …/EKON15-Renaissance-Hotel-Düsseldorf
  2. Beyond Compare would show the same content
  3. After a check-out git would not understand the %FC encoded directory name (%FC is IEC_8859-1 encoding for ü and \374 is the octal representation of 0xFC [WayBack]) and a git status would show stuff like this:
    • Untracked files:
        (use "git add ..." to include in what will be committed)
      
          EKON15-Renaissance-Hotel-D%FCsseldorf/

      or

      deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Debugging/BO-EKON15-Delphi-XE2-Debugging.pdf"
  4. A git rm -r --cached call [WayBack] would not work, as both these would fail:
    • $ git rm -r --cached EKON15-Renaissance-Hotel-D%FCsseldorf
      fatal: pathspec 'EKON15-Renaissance-Hotel-D%FCsseldorf' did not match any files
      

      and

      $ git rm -r --cached "EKON15-Renaissance-Hotel-D\374sseldorf"
      fatal: pathspec 'EKON15-Renaissance-Hotel-D\374sseldorf' did not match any files
      
  5. a

So git could:

  • detect the directories and files
  • display the names of the detected directories and files
  • not translate back the specified names into directories and files

All if this was with:

$ git --version
git version 1.9.5 (Apple Git-50.3)

This is how I fixed it

First I created an alias:

alias git-config="echo global: ; git config --list --global ; echo local: ; git config --lis --local ; echo system: ; git config --list --system"

That allowed me to view the git settings on various levels in my system.

It revealed I didn’t have the core.precomposeunicode setting at all (valid values are true or false). I also read various stories about one or both being the correct value: osx – Git and the Umlaut problem on Mac OS X – Stack Overflow [WayBack].

 

 

–jeroen

Result of git status:


$ git status .
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add/rm <file>…" to update what will be committed)
(use "git checkout — <file>…" to discard changes in working directory)
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Debugging/BO-EKON15-Delphi-XE2-Debugging.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Unit-Testing/BO-EKON15-Delphi-XE2-Unit-Testing.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-0-sample-code.txt"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-1-Delphi-64bit.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-2-LiveBindings-DataBinding.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-3-Delphi-VCL Styles.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-4-Delphi-FireMonkey.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-Workshop/BO-EKON15-2011-XE2-Wokshop-5-Delphi-FireMonkey-xPlatform.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/Delphi-XE2-and-XML/BO-EKON15-2011-Delphi-XE2-and-XML.pdf"
deleted: "EKON15-Renaissance-Hotel-D\374sseldorf/XSL-transforming-XML/BO-EKON15-2011-XSL-transforming-XML.pdf"

 

Posted in Development, DVCS - Distributed Version Control, Encoding, git, ISO-8859, Software Development, Source Code Management | Leave a Comment »

URLs and domains that OS-es use to detect Captive Portals

Posted by jpluimers on 2017/05/11

OS X

Android / Chromebook:

  • clients3.google.com

iOS 6:

  • gsp1.apple.com
  • *.akamaitechnologies.com

iOS 7:

iOS 8/9:

Windows

Amazon Kindle (Fire)

OS X settings are in:

  • /Library/Preferences/SystemConfiguration/CaptiveNetworkSupport/Settings.plist

–jeroen

via:

Posted in Communications Development, Development, Internet protocol suite, Network-and-equipment, Software Development, TCP | Leave a Comment »