Create an __init__.py file in each directory that will be in the tree of your import. For example, if you have the following directory structure… /opt/software/com/yourcompany/yourdivision/yourfile.py …you would issue the following commands: export PYTHONPATH=$PYTHONPATH:/opt/software touch /opt/software/com/__init__.py touch /opt/software/com/yourcompany/__init__.py touch /opt/software/com/yourcompany/yourdivision/__init__.py…
Author: Steve
Getting started with github
I had a prebuilt Node.js application. It is nothing fancy, but I wanted to create a repository for it. This is simply a screenshot of the commands used to do this. -bash-4.1$ cd arch/ -bash-4.1$ ls node_modules package-lock.json server.js -bash-4.1$…
How to map host IP, gateway, and broadcast address to troubleshoot
Get the following: IP address of host IP address of gateway (usually router or firewall) get subnet mask on host Get network CIDR (can be calculated) For example, assume we have the following output of ifconfig… [root@CMHLDORLGRD01 ~]# ifconfig eth0…
Poor man’s way to calculate query time from app server
I wanted to understand where an app was spending time. I couldn’t get the granularity I needed from New Relic, and SSMS aggregated the data so I couldn’t see it. I came up with what is below, admittedly, somewhat obtuse,…
Windows – who has a file open?
Use resmon.exe as shown below…
Good java decompiler
I had a need to find all classes that exposed a REST based interface. I couldn’t figure out how to do this with jd-gui, so this will be my new go-to for decompiling… https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler $ for f in $(find .…
Flexibly instrumenting java with CPU utilization recordings
Each of these has their own set of strengths, and is appropriate for differing and sometimes similar requirements. What each of them lack is the ability to flexibly, easily, and succinctly report on CPU utilization at not only an individual…
JetBrains dotPeek
Nice decompiler, this is a just a note for reference. Original source code …and the output of the decompiler…
Simple JBOSS Fuse/Karaf Camel route deployment, part 2
A previous post provided a simple example of a karaf deployment with a Camel route. This one takes it a step further and provides a Camel processor that connects to another application, fetches content, and enhances it. The application properties…
Releasing H2 lock that prevents startup
We have a small keycloak instance in development that would not start after a VM failure. We ended up restoring the filesystem on which it lives, which resolved the issue. After that fact, I drilled in to determine how to…