Skip to content

Instantly share code, notes, and snippets.

View aolszowka's full-sized avatar
🦎
Looking for Bugs

Ace Olszowka aolszowka

🦎
Looking for Bugs
  • Billings, Montana
View GitHub Profile
@JustinGrote
JustinGrote / PSAnywhere.md
Last active September 21, 2022 09:34
Powershell Debug Anywhere Design

CURRENT (5.1+ Compatibility)

  1. Main process starts the bootstrap script (e.g. iwr git.io/PSAnywhere | iex)
  2. Monitor for the process going into debugging state with a "sidecar" runspace that will watch the availability event for debug status
  3. When a process goes into debug, write to the main host that debug was detected and sidecar is starting
  4. Spawn a new namedpipe client that attaches to the relevant process' autogenerated named pipe
  5. Start a new instance of the golang ssh server and redirect stdio to the named pipe. The golang ssh server will have a powershell subsystem that simply interacts with stdin/out EDIT: Investigating using https://github.com/intothevoid/sshserver instead of sshdog
  6. [Optional] Expose the ssh port via rendevous service (Use gonnel/azure relay/websocat/inlets/whatever)
  7. You should now be able to enter-pssession -hostname -port <custom server port, will default to 22222> from the client and then debug-runspace (id) to debug the process.

This will work in

@David-Lor
David-Lor / MQTTSubscribe.sh
Created July 11, 2019 12:29
Shell Script to subscribe to MQTT and execute a callback
#!/bin/bash
# This script subscribes to a MQTT topic using mosquitto_sub.
# On each message received, you can execute whatever you want.
while true # Keep an infinite loop to reconnect when connection lost/broker unavailable
do
mosquitto_sub -h "127.0.0.1" -t "test" | while read -r payload
do
# Here is the callback to execute whenever you receive a message:
@dergachev
dergachev / backup-services.md
Last active October 12, 2023 06:14
Results of my backup services research

backup services research

I googled around, especially with site:news.ycombinator.com for backup recommendations. Here are notes on the top hits.

tarsnap

http://www.tarsnap.com/

  • by prolific HN member; focus on encryption and deduplication
@dergachev
dergachev / README.md
Created October 10, 2012 16:49
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM