Skip to content

Instantly share code, notes, and snippets.

docker container inspect influxdbV1 | grep IPAddress
- influxdbV1 is the name of the docker instance
@dixsonhuie
dixsonhuie / helm
Last active March 5, 2025 20:15
k8s snippets
# this works similar to force delete
helm delete <chart name> --no-hooks
# show all charts, even ones that were not successfully deleted
helm list -aA
-a no filter applied (uninstalling releases not shown otherwise)
-A all namespaces
/*
Insert many rows in roughly 1 k objects.
https://dba.stackexchange.com/questions/130392/generate-and-insert-1-million-rows-into-simple-table
*/
drop table t1;
declare @count int;
declare @filler nvarchar(1024);
// get datbase tablename from NHibernate from Type of class - entryType below
var classMetaData = SessionFactory.GetClassMetadata(entryType) as NHibernate.Persister.Entity.AbstractEntityPersister;
string tableName = classMetaData.TableName;
package gclogreader
import scala.io.Source
import scala.util.matching.Regex
object GCAdaptive extends App {
val filename = raw"C:\Users\Dixson\gc_pid16200.log"
@dixsonhuie
dixsonhuie / app-log.py
Last active November 7, 2024 20:06
python examples
import os
import sys
import csv
import re
import logging
import argparse
import datetime
col_li = ['filename', 'line_number', 'host', 'pid', 'comp', 'id', 'time', 'ms', 'category', 'level', 'logger', 'message']
@dixsonhuie
dixsonhuie / Windows 10 remove pre-installed software
Last active December 18, 2017 16:15
Windows 10 remove pre-installed software
Get-AppxPackage | Select Name
Get-AppxPackage | Select Name | Sort-Object
Get-AppxPackage *XboxSpeech* | Remove-AppxPackage
Settings | Privacy | Speech, inking and typing | Stop getting to know me
Settings | Update and security | Windows update | Advanced options | Delivery optimization | Allow downloads from other PCs
// get the supported ids for GMT-05:00 (Eastern Standard Time)
String[] ids = TimeZone.getAvailableIDs(-5 * 60 * 60 * 1000);
// if no ids were returned, something is wrong. get out.
if (ids.length == 0)
System.exit(0);
// begin output
System.out.println("Current Time:");
// create a Eastern Standard Time time zone
@dixsonhuie
dixsonhuie / awk example
Last active April 28, 2025 18:53
unix snippets
find . -type f -exec cksum {} \; > cksum.txt
# change the order of the columns so that the filename is the first column. Use a comma to separate the fields.
awk '{ for(i=3; i<=NF; i++) { if (i==NF) {printf "%s", $i;} else {printf "%s ",$i;}} printf ", %d, %d\n", $1, $2;}' cksum.txt
# get the list of file extensions that exist in a directory and its children
for i in `find . -type f`; do basename $i | awk -F. '{print $NF}'; done | sort | uniq
# awk example, expanded program in shell script, prints filename and owner