Skip to content

Instantly share code, notes, and snippets.

View ksader's full-sized avatar
💭
Sparkling Isolation

Keith Sader ksader

💭
Sparkling Isolation
View GitHub Profile
@ksader
ksader / gist:9fe51198d7e2715349c4ed818228cc5a
Created August 10, 2020 07:41
Ping ala PowerShell & Excel
In Powershell: ```Install-Module ImportExcel -Scope CurrentUser```
```Test-Connection -ComputerName (Import-Excel '.\sheet.xlsx' -WorkSheetname 'Tab1' -HeaderName 'Hostname').Name```

Start-Job {& java -Xmx1G -Xss10m -jar .\target\myapp-<version>.jar --spring.config.location=classpath:application.yml,classpath:application-dev.yml > ./logs/be-logs.log 2>&1}

Spool things into MySql: Get-Content \mytables.sql | docker exec -i mysql-5-7 mysql -uroot -psecret

@ksader
ksader / Kafka-2-11-DockerInstall.md
Last active August 10, 2020 07:45
Docker install for an older version 2.11 of Kafka - should work for later versions - maybe.

Most of this is an update from an old, for the internet, tutorial on Kafka and Docker. I've updated the shell scripts to work with PowerShell and Linux as well as using an older version of Kafka.

  1. Install Docker, I'll wait.
  2. Create the docker swarm: docker swarm init
  3. Create the network for the containers docker network create -d overlay --attachable kafka-net
  4. Install Zookeeper docker service create --network kafka-net --name zookeeper --publish 2181:2181 qnib/zookeeper
  5. Install Zookeeper UI(optional but handy) docker service create --network kafka-net --name zkui --publish 9090:9090 qnib/plain-zkui:latest
  6. Install the first Kafka brokerdocker service create --network kafka-net --name broker --hostname="{{.Service.Name}}.{{.Task.Slot}}.{{.Task.ID}}" -e KAFKA_BROKER_ID="{{.Task.Slot}}" -e ZK_SERVERS=tasks.zookeeper qnib/plain-kafka:1.1.0 - this installs 2.11 kafka
  7. Create a topic on the Kafka broker Linux: ```docker exec -t -e JMX_PORT="" \ $(docker ps -q --filter
@ksader
ksader / keybase. md
Created May 19, 2020 19:52
keybase verification
### Keybase proof
I hereby claim: * I am ksader on github. * I am ksader (https://keybase.io/ksader) on keybase. * I have a public key ASA2omjFfW9nQ7IBCPnhzT8zlrN70Tdj-YOgOAEgJv0YTQo
To claim this, I am signing this object:
```json
{ "body": { "key": { "eldest_kid": "012036a268c57d6f6743b20108f9e1cd3f3396b37bd13763f983a038012026fd184d0a", "host": "keybase.io", "kid": "012036a268c57d6f6743b20108f9e1cd3f3396b37bd13763f983a038012026fd184d0a", "uid": "c5efcbf28d69bf8b4cc5fa8af3191a19", "username": "ksader" }, "merkle_root": { "ctime": 1589917535, "hash": "31613dce423572e8546d568ef5f90e77920555fe976e2449c11820f8ac040317b0295482833b17f42f653f1d9537739ef2a74730743df1d4c91b9bb2f1d2c34a", "hash_meta": "e1ce5d0b7352efc85a176b5e9a1069473be811badc110ec162f21307a89b2c85", "seqno": 16348969 }, "service": { "entropy": "ZMAlgDQqg2xXjwxsCb/UahoX", "name": "github", "username": "ksader" }, "type": "web_service_bindin