Author: Steve

Browsers and Cache-Control headers

Chrome and Microsoft Edge both have odd rules for this. If you reload a tab, the browser completely ignores the directive and requests the content, anyway. If you copy the URL to a new tab and request it, it honors…

ELK simple POC

I tried using the getting started guide, and knew I was in trouble when they had me downloading shakespeare.json. Why does every IT person think that other IT people are “cultured” and would be interested in Shakespeare as a datasource…

Improving batch inserts into MySQL

We had a custom class to copy data from Oracle to MySQL at AWS. It was sending each statement individually, even though we batched them. import java.sql.*; public class test { public static void main(String args[]) throws Exception { Class.forName("com.mysql.jdbc.Driver");…

Running admin commands on secondary mongodb server

You have to let your session know that reading this information from a non-primary server is OK (literally)… -bash-4.1$ mongo rs1:SECONDARY> show dbs 2018-02-01T10:37:58.457-0500 E QUERY [thread1] Error: listDatabases failed:{ "operationTime" : Timestamp(1517499476, 1), "ok" : 0, "errmsg" : "not…

Spinlocks, does Oracle use them?

I often write simple C programs to better understand how a given enterprise software program works. Latches in the Oracle database are “in memory locks that protect critical sections of code”. Oracle kernel developers decide that a given section of…

Python modules

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…

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$…