Skip to content

Instantly share code, notes, and snippets.

View tspannhw's full-sized avatar
💭
Unstructured Data, Vector Database, Cloud, AI, Edge, Streaming, SQL

Timothy Spann tspannhw

💭
Unstructured Data, Vector Database, Cloud, AI, Edge, Streaming, SQL
View GitHub Profile
@abajwa-hw
abajwa-hw / deploy_hdp31hdf34.sh
Last active October 29, 2020 21:31
Deploy HDP 3.1 and HDF 3.4
#!/usr/bin/env bash
# Launch Centos/RHEL 7 VM with at least 8 vcpu / 32Gb+ memory / 100Gb disk
# Then run:
# curl -sSL https://gist.github.com/abajwa-hw/9bf11bcaadaa7f94f9075432ce5b3d0b/raw | sudo -E sh
export create_image=${create_image:-true}
export ambari_version=2.7.3.0
#export mpack_url="http://public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.4.0.0/tars/hdf_ambari_mp/hdf-ambari-mpack-3.4.0.0-155.tar.gz"
#export mpack_url="http://public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.4.1.0/tars/hdf_ambari_mp/hdf-ambari-mpack-3.4.1.0-5.tar.gz"
export mpack_url="http://public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.4.1.1/tars/hdf_ambari_mp/hdf-ambari-mpack-3.4.1.1-4.tar.gz"
@abajwa-hw
abajwa-hw / deploy_hdf34.sh
Last active October 29, 2020 21:29
Automation to deploy HDF 3.4 on RHEL 7
#!/usr/bin/env bash
# Launch Centos/RHEL 7 Vm with at least 4 cores / 16Gb mem / 60Gb disk
# Then run:
# curl -sSL https://gist.github.com/abajwa-hw/c37d0e847054cf519813066401c33388/raw | sudo -E sh
export ambari_password=${ambari_password:-StrongPassword}
export db_password=${db_password:-StrongPassword}
export nifi_password=${nifi_password:-StrongPassword}
export ambari_services="ZOOKEEPER STREAMLINE NIFI KAFKA STORM REGISTRY NIFI_REGISTRY KNOX AMBARI_METRICS"
export cluster_name=${cluster_name:-hdf}
@alopresto
alopresto / custom.py
Created March 25, 2019 20:21
Python script to display two lines of different-colored text on Inky pHAT.
from inky import InkyPHAT
inky_display = InkyPHAT("red")
inky_display.set_border(inky_display.WHITE)
from PIL import Image, ImageFont, ImageDraw
img = Image.new("P", (inky_display.WIDTH, inky_display.HEIGHT))
draw = ImageDraw.Draw(img)
@alopresto
alopresto / display_sense_hat.py
Created March 25, 2019 20:20
Python script to display Sense HAT readings on Inky pHAT.
from inky import InkyPHAT
inky_display = InkyPHAT("red")
inky_display.set_border(inky_display.WHITE)
#inky_display.set_rotation(180)
inky_display.v_flip=True
inky_display.h_flip=True
#inky_display.rotation=2
from PIL import Image, ImageFont, ImageDraw
@NISH1001
NISH1001 / sql-server-cdc.md
Last active September 28, 2024 20:03
CDC (change data capture) for Microsoft SQL server

MSSQL CLI

github...

UI

https://dbeaver.io/

sqlcmd -S <ip> -d <dbname> -U <username> -P <password> -I
@Sawaba
Sawaba / javainstall.sh
Created March 6, 2019 16:02
Java JDK 11 install script for Windows Subsystem for Linux (WSL)
#!/bin/bash
# This script adapted from an older post on StackOverflow by user fieldju
# https://stackoverflow.com/questions/36478741/installing-oracle-jdk-on-windows-subsystem-for-linux
# The script was for JDK 8.
# Due to major changes with JDK 11 (no JRE, no Derby, Unlimited Strength included), it was necessary to update the entire script.
set -ex
# UPDATE THESE URLs (this one updated as of 2019-03-06)
export JDK_URL=http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.tar.gz
@alopresto
alopresto / simple_msr.groovy
Created February 11, 2019 19:56
Very simplistic magnetic stripe track 1 & 2 parsing logic in Groovy. Extracts example fields and writes to JSON output.
import groovy.json.JsonBuilder
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
import org.apache.commons.io.IOUtils
import org.apache.nifi.processor.io.StreamCallback
import java.nio.charset.StandardCharsets
def flowFile = session.get()
if (flowFile == null) {
@phrocker
phrocker / with nar
Created February 5, 2019 01:36
with nar
{
"operation": "heartbeat",
"agentInfo": {
"agentManifest": {
"buildInfo": {
"compiler": "/Library/Developer/CommandLineTools/usr/bin/c++",
"flags": " -std=c++11 -DOPENSSL_SUPPORT",
"revision": "9d9f3a6c50b2170368a6bbbf07e94e3bcb7a483b",
"timestamp": 1549300359,
"version": "0.6.0"
@abatko
abatko / US Zip Code Geolocations from 2018 Government Data
Last active June 23, 2025 18:34
All US zip codes with their corresponding geolocations (latitude and longitude coordinates). Comma delimited for your database goodness. Source: https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html > ZIP Code Tabulation Areas > Download the ZIP Code Tabulation Areas Gazetteer File
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158327, -66.932928
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.447538, -66.557681
00622,17.991245, -67.153993
@abajwa-hw
abajwa-hw / deploy_hdp31hdf33.sh
Last active July 16, 2019 18:26
Deploy HDP 3.1 and HDF 3.3
#!/usr/bin/env bash
# Launch Centos/RHEL 7 VM with at least 8 vcpu / 32Gb+ memory / 100Gb disk
# Then run:
# curl -sSL https://gist.github.com/abajwa-hw/d7cd1c0232c1af46ee2c465e4871ddc6/raw | sudo -E sh
export create_image=${create_image:-false}
export ambari_version=2.7.3.0
export mpack_url="http://public-repo-1.hortonworks.com/HDF/amazonlinux2/3.x/updates/3.3.0.0/tars/hdf_ambari_mp/hdf-ambari-mpack-3.3.0.0-165.tar.gz"
export hdf_vdf="http://s3.amazonaws.com/public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.3.0.0/HDF-3.3.0.0-165.xml"
export minifi_java="http://public-repo-1.hortonworks.com/HDF/3.3.0.0/minifi-0.6.0.3.3.0.0-165-bin.tar.gz"