Prepping a Motorcycle for Long-Term Storage

The best thing for a motorcycle is to ride it regularly. However, if you are not going to ride your motorcycle for two years or more the best thing for it is to mothball it properly so that it will not suffer long-term damage in storage.

Wash, polish, and wax

Give the motorcycle a really good bath. First rinse it and then wash all of the painted surfaces with soap and water. Then rinse and go back and use mineral spirits on a paper towel to remove any tar or hard to remove dirt. Then wash again with soap and water to remove the grime and mineral spirits and and rinse well. Wash the wheels, forks, swing arm, exposed parts of the engine, and exhaust trying not to get water into the exhaust. Use a leaf blower to blow most of the water from the bike and then use either a leather chamois or soft microfiber cloth to dry the painted surfaces.

Once the body work is completely dry, polish and wax it.

Clean, clean, clean

Remove all of the body work and clean as best you can. If the bike is really dirty, take it back outside and use a soft brush with soap and water to remove any grease and grime from engine casings, swing arm, forks, side and center stand, wheels, etc. You can also use WD-40 and/or Windex and soft rags to clean off grease and dirt.

Clean the chain with a proper cleaner that will not damage the o-rings or x-rings and a soft tooth brush.

Change the coolant

Drain the coolant by removing the coolant drain bolt (usually on the water pump) as best you can and then flush with a quart or so of fresh coolant. Re-install the coolant drain plug with a new crush washer and tighten. Fill with fresh coolant. When it is almost full, gently squeeze the exposed radiator and coolant hoses to force air to bubble up to the fill opening of the system. Continue to do this until you cannot fill it anymore. Flush and then fill the overflow reservoir and then run the bike.

Let it get hot, until the fans come on and then turn off the bike and let it cool. Let it cool about 10 minutes or so and then change the oil (see below).

Once it is completely cool, open the coolant fill cap and top off the system. Also top off the reservoir.

Change the oil and filter

While the motor is still warm change the oil and filter and fill with fresh oil. Turn it over, or run it to fill the oil filter and then top it off.

Drain Carburetors or Depressurize Fuel Lines

If you have carbs on your bike completely drain them. If your bike is fuel injected, remove the connection to the fuel pump from the wiring harness and start the bike, it should only run for a second until it stalls. This will relieve the pressure in the fuel lines to the injectors and mostly drain the fuel rail.

Fog the Engine

Remove the spark plugs from each of the cylinders spray some engine fogging oil into each of the cylinders and then turn the motor over a few times. Replace the plugs.

Drain Fuel Tank and Fuel Lines and Fog the Tank

One of the worst things that you can do for the bike is to leave it with fuel in it for a few years. You will almost certainly come back to a rusted out tank and the fuel pump and lines clogged with some terrible gunk.

Completely drain the tank. This is a bit more difficult than it sounds as you want to get ALL of the liquid fuel out of it. Start by turning off the petcock, attaching a fuel line to it and putting the other end into a sufficiently sized fuel container and turning the petcock to “Reserve” to drain as much fuel as possible.

If your bike has the fuel pump in the tank itself, without a petcock, you can either

  • Get a hand/ball fuel transfer pump and insert one end of the hose into the lowest part of the tank and pump it out
  • Disconnect the pump from the wiring harness and attach one end of some fuel line to the fuel pump outlet and put the other into a fuel container. Then power the pump directly with a 12v power supply to pump out the fuel. Ensure that as you turn off the pump as soon as it is dry or you can damage the pump

Once you have removed as much of the fuel as possible get some absorbent, long, rags; an old pair of kids sweat pants works great. Hold the tank vertically so that the lowest part is now the front of the tank and all of the remaining fuel has moved to what is now the lowest point. Stuff the rag into the tank towards what is now the lowest part of the tank to try to soak up as much of the remaining fuel as possible, making sure not to completely insert the cloth into the tank because you will need to remove it. Pick the tank up and move it around to try to get the fuel to come in contact with the cloth. Then, carefully, remove the now gasoline soaked cloth and discard it. Pick the tank up and gently rotate it. You should no longer hear fuel sloshing around in it. Continue the process until you no longer hear any liquid sloshing around.

Using compressed air, blow into the tank opening to try to dry out the remaining fuel. Then leave it open, overnight, to dry out.

The next day, take a full can of fogging oil (you can use the rest of the can that you used to fog the motor) and spray that into the tank. Removing the gas cap assembly will make it easier to spray into the tank at different angles. Try to coat the entire interior surface of the tank. Once you have emptied the can into the tank, reinstall and close the gas cap and then gently turn it around to ensure that you have coated the interior of the tank.

Flush Brake and Hydraulic Fluid

Completely flush all hydraulic fluids. Brakes and, if your bike has it, the hydraulic clutch. You can start by opening the reservoir and sucking out any fluid in there and then refilling it before flushing each of the systems. Ensure to run at least three reservoirs or more through each system until the fluid comes out completely clear. Top off with fresh fluid.

Lube Cables

Remove and lube all cables; throttle, choke, and clutch.

Lube/Coat the Chain

Lube the chain liberally with an appropriate chain lube. This will help prevent the chain from corroding.

Remove the Battery

Finally, remove the battery completely from the bike. More likely than not, if it is going to sit unused for a long time you will need to get a new one anyway and you do not want to worry about having to keep it on a tender or corroding and leaking acid all over your bike.

Put it up on “Blocks” Indoors and Cover it

Find a safe place to store it. The best places to store it, in descending order

  1. Climate controlled indoor space
  2. A garage
  3. A shed

Ideally, you will store it suspended by the frame and not the suspension.

Get a front stand that lifts the bike with a pin that inserts into the bottom of the steering stem and use that to lift the front wheel off of the ground.

If your bike has a center stand use that to raise the rear wheel off of the ground. You will probably need to put it on a few blocks of wood so that it raises it high enough to match the height of the front stand. If it does not have a center stand, you will need to fabricate some sort of stand on which the lower part of the frame rests, where the swing arm mounts to the bike

Cover the bike with a proper motorcycle cover.

Thanksgiving Roast Turkey

Ingredients

  • 12 – 20 pound turkey
  • 1 large yellow onion, quartered
  • 1 orange, quartered
  • 1 apple, quartered. It doesn’t matter what kind as it is going to cook inside the turkey and you will not eat it
  • 3/4 oz fresh rosemary
  • 3/4 oz fresh sage
  • 3/4 oz fresh thyme

Herb Butter

  • 1 cup unsalted butter, softened
  • 1/2 tsp salt
  • 1/2 tsp fresh ground pepper
  • 6 – 8 cloves of garlic, minced
  • herbs

Directions

  1. If the turkey is frozen, thaw it in the fridge for 24 hours for each 5 pounds of turkey. Ensure that your fridge is between 40 and 32 degrees F.
  2. Take the turkey out of the fridge 1 hour before putting it into the oven to let it come to room temperature. You can factor in the time to prep it.
  3. Preheat oven to 325 F and adjust your oven rack so that the turkey will sit in the center of the oven.
  4. Chop all of the fresh herbs but keep them separated
  5. To make the herb butter, combine the softened butter, minced garlic, salt, pepper, one tablespoon chopped rosemary, one tablespoon chopped thyme, and 1/2 tablespoon chopped sage.
  6. Remove the turkey from the packaging and remove the giblets and neck from the cavity. I usually put the neck in the cavity when cooking it. Pat the turkey dry with paper towels.
  7. Season the cavity with salt and pepper.
  8. In a large mixing bowl, combine the onion, orange, and apple and remaining chopped herbs and then stuff the cavity with this mixture and the neck. Use one or two trussing needles to close the cavity. Pull the skin together and then poke the needle through both sides of the skin. Then turn the needle and poke it through the skin going back the other direction, as if you were going to sew it closed, but leave the needle passing through both sides.
  9. Loosen the skin above the breasts and spread a couple of tablespoons of butter between the skin that the breast meat.
  10. Place the turkey in the roasting pan and tuck the wings under the bird or tie them to the bird with kitchen twine.
  11. Use a silicone rubber band to bind the legs together over the now closed cavity so that the legs are held close to the body. If necessary use kitchen twine to ensure that the legs and wings are held close so that they do not over cook. You want what is essentially a single blob of turkey without any bits sticking out.
  12. Spread or brush the herb butter over the outside if the turkey to include the legs and wings
  13. Roast at 325 F for about 12 – 15 minutes per pound, until the internal temperature is 160 degrees. Start cooking the turkey covered or tented in foil. Then remove for the last hour or so so that it browns.
  14. Check the turkey half way through the estimated cooking time and then other times as you get closer. Realize that the internal temperature does not rise in a linear fashion, but it more of a gradual exponential curve. It will take less time for it to rise 10 degrees towards the end of cooking than towards the beginning or middle. When testing the turkey with a thermometer check in the deepest part of the breast, and in the thigh between the body, ensuring not to hit a bone.
  15. Once at 160 degrees F, remove the turkey from the oven. Transfer it from the baking pan to a suitably sized cutting board and cover it with tinfoil and then a few layers of kitchen towels. This is the final cooking stage. The meat will continue to cook and cool slowly and as a result maintain its juices and moisture. Save the drippings in the pan to make gravy
  16. Let it sit for about 45 minutes and then carve it.

How to quit Amazon

I have considered quitting Amazon over the past few years, however Jeff Bezos recently kowtowing to Trump was the last straw.

Will it end up costing me more money to purchase some items and will it take longer for me to get them? For sure, but I am willing to live with that.

The first thing that I wanted to do was to get my purchase history. Often time, I will search through it to remember something that I bought in the past. It seems that Amazon offers a way to download a CSV of that data.

How to download all of your purchase history

  1. Login to Amazon
  2. Rollover Accounts & Lists and towards the top of the list select Account
  3. Scroll down to the bottom of the page and look for the Manage your data or similarly titled section. The YouTube video that clued me into this was only a year old and the verbiage on the page was different in the video
  4. Click on Request your data
  5. Click on Your Orders
  6. Click Submit request
  7. You will then be sent a confirmation email in which will contain a link that you will need to click on to start the process

The web page to which the confirmation email took me read

We will provide your information to you as soon as we can. Usually, this should not take more than a month. In exceptional cases, for example if a request is more complex or if we are processing a high volume of requests, it might take longer, but if so we will notify you that there will be a delay.

So, it could take up to 30 days to receive an email from them with the link to download your data.

Alternatives

Part of the problem of Amazon is that it is so good at aggregating products and has become the defacto product search engine. The fact is that most of the products on Amazon can be found through other online retailers.

Just search for what you want online and scroll past the Amazon links :).

There are also other “product aggregation marketplace” retailers

  • ebay: ebay used to be primarily for used and hard to find items that people would bid on, but there are now many retailers that are selling new products there.

I will expand this list as I find and use them.

My jq cheat sheet

jq is pure awesomeness. If every you want to “grep” through JSON data on the command line, this is the tool for you. Unfortunately, I don’t use it everyday, so when I do go to use it I forget the details for doing some basic operations.

Sample Data

[
    {
        "name": "Homer Simpson",
        "occupation": "Nuclear Safety Inspector"
    },
    {
        "name": "Marge Simpson",
        "occupation": "Mayor"
    },
    {
        "name": "Milhouse Van Houten",
        "occupation": "Student"
    },
    {
        "name": "Homeboy Van Somebody",
        "occupation": "Lawyer"
    }
]

Filtering

Often you will have json and you’ll want to filter out all objects that do not meet some criteria.

Selecting objects with a specific value

❯ jq '.[] | select (.name == "Homer Simpson")' sample.json 
{
  "name": "Homer Simpson",
  "occupation": "Nuclear Safety Inspector"
}

Outputting a new JSON object based on the input data

❯ jq '.[] | select (.name == "Homer Simpson") | {character_name: .name, job: .occupation}' sample.json 
{
  "character_name": "Homer Simpson",
  "job": "Nuclear Safety Inspector"
}

Using a regex

❯ jq '.[] | select (.name | test("Home"))' sample.json 
{
  "name": "Homer Simpson",
  "occupation": "Nuclear Safety Inspector"
}
{
  "name": "Homeboy Van Somebody",
  "occupation": "Lawyer"
}

Vegetarian Shepherd’s Pie

This is a recipe by Samantha Seneviratne.

Ingredients

Topping

  • 2 tablespoons kosher salt
  • 2 pounds russet potatoes, peeled and quartered (about 3 large)
  • 6 tablespoons unsalted butter
  • 1/2 cup whole milk
  • 1/2 cup sour cream
  • 1/2 cup packed grated Parmigiano-Reggiano cheese or vegetarian Parmesan (optional)
  • Freshly ground black pepper

Filling

  • 3/4 cup French lentils
  • 4 sprigs thyme
  • 3 1/2 cups vegetable broth
  • 1 teaspoon kosher salt
  • 4 tablespoons butter
  • 8 ounces sliced mixed mushrooms, such as button, cremlnl and shiitake
  • 1 large leek, white part only, thinly sliced (about 1 1/2 cups)
  • 2 medium carrots, peeled and diced (about 1 cup)
  • 2 cloves garlic, minced
  • Freshly ground black pepper
  • 2 tablespoons tomato paste
  • 2 tablespoons flour
  • 1 cup frozen peas, thawed
  • 1 to 2 teaspoons fresh lemon juice

Directions

  1. In a large pot, bring a gallon of water and 2 tablespoons salt to a boil over high heat. Add potatoes to boiling water and boil for about 15 to 20 minutes, until soft; a knife should go in with almost no resistance.
  2. Meanwhile, prepare the filling: In a 10-inch oven-safe skillet with high sides or an enameled cast-iron braiser over medium-high heat, bring the lentils, thyme and 2 cups of the broth to a simmer with 1 teaspoon salt. Reduce the heat and continue to cook the lentils, partly covered, until they are tender and most of the liquid is absorbed, about 20 minutes. Transfer the lentils to a bowl.
  3. Finish the topping: In a small saucepan or a microwave oven, heat 6 tablespoons of the butter and milk together until butter melts. Drain potatoes well and return to pot. Using a masher or a ricer, mash hot potatoes until smooth. Mix in the hot butter mixture and sour cream just until blended. Stir in 1/2 of the Parmigiano. Season to taste with salt and pepper. Cover and set aside.
  4. Finish the filling: Heat the oven to 375 degrees. Melt the butter in the 10-inch skillet over medium-high heat. Add the mushrooms and cook, stirring often with a wooden spoon, until they are deep golden brown, about 8 to 10 minutes. Reduce the heat to medium and add leeks, carrots and garlic, and continue to cook until tender, another 10 minutes. Season to taste with salt and pepper. Add the tomato paste and stir, cooking until it is well combined, another 2 to 3 minutes. Sprinkle flour over the mixture, stir and cook for 1 minute. Add remaining 1 1/2 cups broth, cooked lentils and peas, and cook until thickened. Remove thyme stems and stir in lemon juice to taste.
  5. Top the mixture with dollops of the mashed potatoes, then spread them out over the top. (Or transfer the lentil mixture to a 3-quart casserole dish and spread into an even layer, and top with potatoes.) Sprinkle with the remaining Parmigiano. Transfer to the oven and, if the mixture is at the top edges of your pan, set a foil-lined baking sheet underneath the pan to catch any drips. Bake the pie until the potatoes have begun to brown and the edges are bubbling, about 30 minutes. Let stand at room temperature for 15 minutes before serving.

Debian Package Management Cheat Sheet

  • List version of an installed package: dpkg -s docker-ce | grep Version
  • Show all available versions of a package: apt-cache madison <package>

Packages being held back because of phasing

Run the following command replacing the package in question

apt-get --with-new-pkgs upgrade <package-name>

The following packages have been kept back

Try the following, in order. Each is less risky than the next. Stop as soon as you have fixed the problem.

Solution 1

apt-get --with-new-pkgs upgrade <list of packages kept back>

Solution 2

apt-get install <list of packages kept back>

Failed to fetch . . . Hash Sum mismatch

If you see an error similar to the following

Reading package lists... Done
E: Failed to fetch https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-all/Packages  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:1677314 [weak]
    - SHA256:09c3377dd2740e63c831dea4a86ccb1253ab6a41ec71eaa1cd4c7e52ee8c9255
    - MD5Sum:16ab83da58155f40c9a5a18a2a8c6587 [weak]
   Hashes of received file:
    - SHA256:ee6eabdfda398ab36e6fa8cd777d5d02b45dbac892dacdf6f1be1ca5ad0cbb65
    - MD5Sum:6dd0c5ac95bc55b7864e66986b71b8fa [weak]
    - Filesize:1677314 [weak]
   Last modification reported: Fri, 04 Apr 2025 01:54:07 +0000
   Release file created at: Tue, 01 Apr 2025 12:57:58 +0000
E: Failed to fetch https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-amd64/Packages
E: Some index files failed to download. They have been ignored, or old ones used instead.

Try removing all of the apt list data

rm -rf /var/lib/apt/lists/* && apt-get update

How to partially cherry-pick a commit in git

There are times when you need to cherry-pick a commit from another branch. Then there are times when you only need parts of that commit.

Following is how you can partly cherry-pick a commit to get only the changes that you need.

Get the patch for the entire commit. Include the -n for no commit so that it does not add it as a commit to your branch

git cherry-pick -n <commit>

Then unstage the the changes from the cherry-picked commit so that you can choose which lines/hunks that you want to include

git reset

From here you can either git add -p to specify specific files or use git gui or some other tool to selectively stage and commit lines or hunks of the current set of changes.

Then just use git commit to commit your changes and reset the rest that you do not want and you are done.

Pancakes

Ingredients

  • 1 1/2 cups all-purpose flour
  • 3 1/2 teaspoons baking powder
  • 1 teaspoon salt
  • 1 tablespoon of honey
  • 2 cups milk
  • 1 egg
  • 3 tablespoons butter, melted

Directions

  1. In a large bowl, sift together the flour, baking powder, and salt.
  2. In a separate bowl, lightly whip the eggs and then add the milk, egg, and honey and mix
  3. Pour the wet mixture into the dry and mix until smooth.
  4. Heat a lightly oiled griddle or frying pan over medium high heat. Pour or scoop the batter onto the griddle, using approximately 1/4 cup for each pancake. Brown on both sides and serve hot.

Banana Bread

If you wait until your bananas are sufficiently over-ripe they will have enough sugar that you don’t have to add much at all and it makes for a much healthier bread.

You can make a double batch, cut up and freeze and it will stay fresh a very long time. Simply remove a piece from the freezer and microwave on high for 45 seconds to a minute and it will taste like it just came out of the oven.

Ingredients

  • 3 large, over-ripe bananas
  • 1 stick of butter, 1/2 cup
  • 2 large eggs
  • 2 cups all purpose flour
  • 2 TBS sugar or you can substitute for honey
  • 1 TSP baking soda
  • 1/2 TSP salt
  • 1/2 TSP cinnamon
  • 1/2 TSP nutmeg
  • 1/4 TSP allspice
  • 1 TSP vanilla extract

Directions

  1. Preheat oven to 350
  2. Rub a pat of butter on the inside of a loaf pan. Then put about 2 TBS of flour on the pan so that the flour coats the entire pan
  3. Measure out all of the dry ingredients into a mixing bowl and stir until well mixed.
  4. Cut up the stick of butter and put it in the microwave. Microwave it for about a minute or so at about 20% until it completely melts, but you don’t want it to be boiling hot
  5. Add the bananas to a large mixing bowl and mash until they are reasonably smooth
  6. Pour the butter into the bananas
  7. Lightly whip the eggs with a fork and add to the banana and butter mixture
  8. Add the vanilla to the wet mixture and the honey if you are using it instead of sugar
  9. Pour the dry ingredient mixture into the wet mixture and stir just enough to combine. The more you stir it the more dense your bread will be after baking it.
  10. You can optionally add chocolate chips, nuts, or raisins
  11. Pour into your baking pan and bake for about 45 minutes. Check to see if the top is firm and starting to brown. If you have doubled your recipe you may need to bake for up to an hour or more. It is hard to over cook it so no need to stress if it stays in the oven a little longer
  12. Remove from the oven and let sit for about 15 minutes. Then smack the pan with your hand to loosen the bread from the pan, remove and place on a cooling rack.
  13. It is really good to eat when still hot from the oven.
  14. Wait until fully cooled and then cut into desired sized pieces and freeze.

Go template that properly renders delimiters for a slice of structs

It is common to write go text/templates that range over a slice of objects to write out a list or array of items that are separated by some delimiter defined in the template.

In the case of a JSON array of objects, the cleanest output would be a , separating each object without a leading or trailing comma.

Because go template if statements are falsey in that a 0 value will evaluate to false you can write a template as follows and it will only render a comma between items as it ranges over the slice

{
  "items":[
  {{- range $index, $item := .Items -}}
    {{- if $index -}},{{ end }}
    {
      "id": {{ $item.Id }}, "name": {{ $item.Name }}
    }
    {{- end }}
  ]
}

Click here for a working example.