This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gclogreader | |
import scala.io.Source | |
import scala.util.matching.Regex | |
object GCAdaptive extends App { | |
val filename = raw"C:\Users\Dixson\gc_pid16200.log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker container inspect influxdbV1 | grep IPAddress | |
- influxdbV1 is the name of the docker instance |