A handy tool that you can use to validate the JSON definition of your Avro schema.→ Continue reading “Online Avro Schema Validator”
Fluffy Waffles
Ingredients
- 1 3/4 cups Flour
- 2 teaspoons baking powder
- 1/2 teaspoon salt
- 1 tablespoon sugar or 1 tablespoon honey
- 3 eggs – separated
- 1 1/2 cup milk
- 1/3 cup vegetable oil
- 1/4 tsp vanilla
Instructions
- Sift dry ingredients in a bowl
- Add egg yolks, milk, vegetable oil, and vanilla to dry ingredients – using a mixer, beat thoroughly
- Beat egg whites until stiff and gently fold egg whites into batter
- For use in waffle iron – Follow manufacturer directions! Makes
Black Bean Cupcakes
Makes about 12 cupcakes.
Ingredients
Cupcakes
- 1/2 cups black beans cooked and drained
- 3 large eggs
- 1 cup plus 2 tablespoons granulated sugar
- 4 tablespoons unsalted melted butter
- 1/2 cups cocoa powder
- 1 teaspoon instant cofee
- 1 teaspoon vanilla extract
- 1/2 teaspoon baking soda
- 1/2 teaspoon salt
- 1/3 cup of chopped dark chocolate
Glaze
- 4 tablespoons unsalted butter
- 1 tablespoons cocoa powder
- 1/2 cup powdered sugar
Instructions
Cupcakes
- Preheat seep to 350F
- In a blender add all at the ingredients
Creating a Launch Config in VSCode to Debug a Python Invoke Script
I regularly use Python Invoke and Fabric for the automation of various tasks; from deploying code to developing my own set of tools for various projects. Following is an example on how to write a launch.json
launch configuration for vscode so that you can step through the tasks.py code and debug it.
Assuming that you have created a virtual environment and pip installed invoke into it. And, assuming that you have defined a task in your tasks.py file as follows:→ Continue reading “Creating a Launch Config in VSCode to Debug a Python Invoke Script”
Using bq load Command to Load logicalType Partitioned Data into a BigQuery Table
Following is the syntax and bq load command that you need to issue if you want to load data in avro file into a partitioned BigQuery table based on avro field defined as a logicalType.
Given the following schema
{
"type" : "record",
"name" : "logicalType",
"namespace" : "com.ryanchapin.tests",
"fields" : [ {
"name" : "id",
"type" : [ "null", "string" ],
"default" : null
}, {
"name" : "value",
"type" : [ "null", "long" ],
"default" : null
},
→ Continue reading “Using bq load Command to Load logicalType Partitioned Data into a BigQuery Table” Sheet Pan Mushroom and Gnocchi
Ingredients
- 1 pound mixed wild mushrooms
- 2 medium shallots
- 1 pound fresh, shelf-stable, or frozen potato gnocchi
- 3 tablespoons olive oil
- 1/2 teaspoon kosher salt
- 1/4 teaspoon freshly ground black pepper
- Fresh thyme leaves, for garnish
Instructions
- Preheat oven to 400F
- Slice mushrooms, chop shallots
- Place mushroom, shallots, and gnocchi in a mixing bowl and drizzle with olive oil. Add seasoning and toss to coat oil and seasonings.
- Turn out onto baking sheet in an even layer
- Roast for about
Flush Commands to BASH History Immediately
I cannot take credit for figuring this one out. Original post is here.
TLDR; is to add the following to your ~/.bashrc
export PROMPT_COMMAND='history -a'
Following are the history configs that I use
######################################################################
shopt -s histappend
HISTSIZE=-1
HISTFILESIZE=-1
HISTCONTROL=ignoreboth
HISTTIMEFORMAT="[%F %T] "
export PROMPT_COMMAND='history -a'
######################################################################
→ Continue reading “Flush Commands to BASH History Immediately” Setting Per File Type Tab Configurations in VSCode
If you would like to have different tab configurations (tabs or spaces) along with the number of tab chars for different file types you can update your user settings.
The first thing you need to do is figure out what the file type code thinks the file that you want to change is. Open the file in vscode and then look at the bottom right of your window. In my case, I’m looking at an avro schema (.avsc) file:
In → Continue reading “Setting Per File Type Tab Configurations in VSCode”
VSCode Keyboard Shortcut to Toggle Visibility of the Explorer Side Panel
I usually have at least two panes in my IDE so that I can see two files, or different parts of the same file, at the same time. VSCode pegs the debug variables in the Explorer side bar so I also end up having to make that panel large at times to see the variables while debugging.
Following are the keybindings that you can add to enable you to toggle the visibility of the left-hand side panel.
Add the following → Continue reading “VSCode Keyboard Shortcut to Toggle Visibility of the Explorer Side Panel”
Code Coverage for Golang Integration Tests with Build Tags
I’ve been writing a lot of Golang code lately. For the most part, I always write unit and integration tests for whatever program that I am building. I’ve been using VSCode as my IDE and really like it. The one thing that I was having trouble with was getting the code coverage to show in the IDE for my integration tests.
I have a different build tag in my unit test code and my integration test code so that I → Continue reading “Code Coverage for Golang Integration Tests with Build Tags”