Technology, useful for the US military and
also useful later for US civilians? Are
there any examples?

(1) US Research Universities. For nearly
all the US research universities, a huge
fraction of their annual budgets comes
from Federally funded research grants via
the National Science Foundation (NSF),
but, trust me on this, passes Congress and
gets signed by the POTUS heavily for US
national security, i.e., the US military.

As a result, the teaching is heavily
supported by that funding. Else college
would cost much more.

Yes, not all the Federal funding is so
closely tied to the US military: Since
the Members of Congress also like progress
in medicine, there is also a lot of
funding via the National Institutes of
Health for bio-medical research and, thus,
support for the research-teaching
hospitals.

(2) GPS.

The Global Positioning System (GPS), now
heavily used for non-military purposes,
was done by the US Air Force (USAF) and
built on the work of the earlier system
for the US Navy. GPS has been terrific
for the US military.

(3) Aircraft Engines.

Aircraft engine development got a big push
during WWI and then again during WWII. By
the end of WWII, the best piston aircraft
engines were mechanical marvels.

But near the end of WWII, both the Germans
and the British saw that just for military
purposes jet engines would be much better.
And the US saw the same: GE had been
making turbines for supercharging the
piston engines so with their turbine
experience moved to make some of the best
jet engines.

With an aircraft engine, we use energy
from the fuel to generate gas pressure to
push mass out the back of the engine.
Then the momentem of that mass (momentum
is mass m times velocity v) provides force
to propel the plane. But the mass moves
out with kinetic energy (1/2)mv^2. So, we
want to pick a pair, mass m and velocity
v, to maximize the momentum for the given
energy. Since in energy we pay for
velocity v with v^2 but mass m with just
m, we should pick the pair to have mass m
large and velocity v small. So, going out
the back of the engine (from a propeller
or a jet) we want lots of mass moving
slowly, not a small mass moving quickly.

So, the US military saw this point for,
e.g., their big cargo plane the C5A and
developed "high bypass jet engines" where
the turbine at the back of the engine
drives a shaft to drive the compressor but
also is used to drive a huge fan at the
front of the engine that acts as a
propeller in a duct to move huge amounts
of cool air around, past (bypass), the
engine and out the back. Now essentially
all large commercial aircraft have high
bypass jet engines -- the cost of jet fuel
makes this crucial.

Actually a little before the high bypass
development, could also get some of the
same benefits with just an aft fan: So,
mount a fan, turbine, on the back of the
engine. Have the fan blades relatively
long so that they extend pass the flow of
the hot gas from burning the fuel. Then
the hot gas turns the fan and the extended
parts of the fan blades push cold air out
the back. A GE engine did that early on;
the French Dassault FanJet Falcon DA-20
used two of those aft fan engines; and
FedEx started with 33 of those planes
modified for cargo.

So, net, the jet engines used in
commercial airplanes were heavily
developed by the US military.

(4) Digital Computers.

So, sure, digital computers got developed
in WWII for calculating artillery tables,
etc. And after the war the US military
was a big customer of digital computers
and pushed the computer companies -- IBM,
GE, Hewlett-Packard, Univac, Control Data,
Systems Engineering Laboratories, etc. --
hard for more powerful computers.

(5) Atomic Power.

We have atomic power for the electric grid
and applied nuclear physics more generally
due mostly to developments paid for by the
US military.

Then it is common for the electronics on
spacecraft -- often for science and not
specifically for the military -- to be
powered by nuclear power.

(6) Radar.

Commercial aviation is massively dependent
on radar, and the first developments were
for military purposes.

(7) The Hubble Telescope.

We can regard the Hubble telescope as used
heavily for non-military science, but in
simple terms the Hubble was a US military
Keyhole surveillance telescope (supposedly
can read car license plate numbers from
orbit) but aimed away from the earth.

(8) Rockets.

Rockets are crucial for getting spacecraft
into orbit (around the earth, the sun,
Mars, etc.) or at escape velocity from the
earth, and of course most of rocket
development was for military purposes.

(9) Optimization.

Optimization, e.g., linear and non-linear
programming, grew out of WWII military
logistics efforts by G. Dantzig and
others. Then asking for whole number
solutions led us to the research on
computational complexity and one of the
most important research problems today,
the question of P versus NP.

(10) The Internet.

Early on the Internet was ARPA-Net, funded
by ARPA, the US military's Advanced
Research Projects Agency.

(11) The Interstate Highways.

Early on President Eisenhower wanted the
Interstate highways as a big contribution
to US military logistics, that is, moving
supplies and equipment.