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 2,057 other followers

Archive for July 14th, 2020

“error: invalid object 100644” “git svn”

Posted by jpluimers on 2020/07/14

A while back, while using “git svn”, on a Windows system, I got [Archive.is“error: invalid object 100644” “git svn” – Google Search after statements like this:

# git svn rebase
error: refs/remotes/git-svn does not point to a valid object!
error: invalid object 100644 ac7df132f5bd7d639fc525f1f0204a546658d0c5 for 'Source/ToDoList/GX_ToDo.pas'
fatal: git-write-tree: error building trees
write-tree: command returned error: 128

# git svn fetch
error: refs/remotes/git-svn does not point to a valid object!
error: invalid object 100644 ac7df132f5bd7d639fc525f1f0204a546658d0c5 for 'Source/ToDoList/GX_ToDo.pas'
fatal: git-write-tree: error building trees
write-tree: command returned error: 128

In my case, regular git operations (like branching, committing, pushing, etc) worked fine, but git svn would fail.

One problem was that [Archive.is“error: refs/remotes/git-svn does not point to a valid object” – Google Search only returned one un-meaningful result: [WayBack] gist:87613 · GitHub.

Luckily, I had a backup (though it was from a while ago as that VM had not been in use for quite some time) which is the first part in [WayBack] Git FAQ – Git SCM Wiki: How to fix a broken repo?.

Since I was still interested finding out how to resurrect, just in case this happens at a time the backups do not go back far enough, I tried the steps below.

The very first fixing step is to ensure you can quickly restore things, or even better: operate on a copy of the broken pieces. On Windows, robocopy /mir is my friend for this, in Linux rsync -avloz (although on some systems, -z crashes).

TL;DR from the fixing steps

Find out what problems you have, and in which order to fix them. Otherwise you will break more stuff and take longer to fix it.

In this case, two things failed: one on the git side, and one on the git svn side. Since git svn depends on git, the best approach is to fix the git problem first, then the git svn thing.

Fixing this manually try 1

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Subversion/SVN | Leave a Comment »

Building a rudimentary battery backup for your USB powered devices (IoT, Raspberry, etc)

Posted by jpluimers on 2020/07/14

Malcolm Lewis [WayBack] came with these interesting pastes for a rudimentary battery backup servicing USB powered devices:

Since both expired, here is some more elaboration with Amazon.com links:

From the picture linked above (full one at the bottom of the post): a switch is missing from the parts list (:

Note that this is only the hardware parts, and no measurements of the voltage from the Raspberry Pi. So it is a battery backup, not a UPS.

For a UPS kind of functionality, you need more hardware (measure voltage to assess when to safely shut down, reset circuitry for when power comes up), and software (so the devices can shutdown).

Connections

After IRC chatting with Lewis (see his [WayBack] profile), this is how they should be connected:

  1. USB charger:
    1. OUT connector type A of USB charger cable
  2. Connections to the TP4056 battery charger (a nice video on this is at Charging a Lithium 18650 Cell using the TP4056)
    1. IN mini/micro USB from connector type B of USB charger cable
    2. BAT pins B+ and B- to the + and – of the 18650 battery holder
    3. OUT pins +/- to your LM2577 IN pins+/-
  3. 18650 battery holder
    1. IN pins +/- to the TP4056 BAT pins +/-
    2. One or two 18650 batteries
    3. Note
    4. Most of the wired “parallel” 18650 dual battery holders on non-USA Amazon sites are in fact serial (you see that in the comments, or by watching the wiring carefully), so better buy an unwired one!
  4. Connections to the adjustable LM2577 step-up converter having a max current of 3A
    (get one *with* voltage meter, as voltage meteres themselves are about half the price of the LM2577!)

    1. IN pins from the TP4056 OUT pins
    2. Adjust to slightly above 5V before connecting anything else!
    3. OUT pins +/- to the red/black pins of a connector A stripped micro USB cable
  5. USB powered device (like Raspberry Pi)
    1. Micro USB connector: connector B of the USB cable coming out of LM2577

If you want to measure both voltage and current, then a combined piece like Voltmeter Amperemeter Dual Digital Volt Amp Meter Messgerät 100V 10A is very convenient. Most of these do not come with schematics, so here is one:

Specs

Parts from Amazon.de

Media

There is a 6A module; though I’m not sure it is based on LM2577

Bad battery box example

–jeroen

Read the rest of this entry »

Posted in Batteries, Development, Hardware Development, Li-Ion, Power User | Leave a Comment »

Is WCF faster than ASP.NET Core? Of course not! Or is it?

Posted by jpluimers on 2020/07/14

Interesting:

How does WCF, a 13-year-old mega-abstraction framework hold up against the modern, lean, ASP.NET Core? You’d be surprised.

Source: [WayBackIs WCF faster than ASP.NET Core? Of course not! Or is it?

Via: [WayBack] Interesting read! – Ondrej Kelle – Google+

–jeroen

Posted in .NET, Development, Software Development | Leave a Comment »

 
%d bloggers like this: