Skip to content

Instantly share code, notes, and snippets.

@jborean93
jborean93 / tls-keylogger.ps1
Last active June 27, 2024 12:18
Logs Wireshark compatible TLS keys like the SSLKEYLOGFILE env var
#Requires -Module PSDetour
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]
$LogPath
)
$LogPath = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($LogPath)
@tgardiner
tgardiner / aws_s3_etag_local_compare.py
Created January 13, 2019 02:52
Compare AWS S3 Etag to local file
#!/usr/bin/env python3.6
import os
import sys
from hashlib import md5
from argparse import ArgumentParser
parser = ArgumentParser(description='Compare an S3 etag to a local file')
parser.add_argument('inputfile', help='The local file')
parser.add_argument('etag', help='The etag from s3')
args = parser.parse_args()
@Ketrel
Ketrel / relBase.html
Last active June 2, 2024 21:25
Relative url base for jekyll
{% assign relBase = '' %}
{% assign tempDepth = page.url | append: 'hackish-solution' | split: '/' | size | minus: 2 %}
{% for i in (1..tempDepth) %}
{% assign relBase = relBase | append: "../" %}
{% endfor %}
{% if relBase == '' %}
{% assign relBase = './' %}
{% endif %}
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 4, 2024 07:36 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@djoreilly
djoreilly / ovs-cheat.md
Last active June 13, 2024 17:05
OVS cheat sheet

DB

ovs-vsctl list open_vswitch
ovs-vsctl list interface
ovs-vsctl list interface vxlan-ac000344
ovs-vsctl --columns=options list interface vxlan-ac000344
ovs-vsctl --columns=ofport,name list Interface
ovs-vsctl --columns=ofport,name --format=table list Interface
ovs-vsctl -f csv --no-heading --columns=_uuid list controller
ovs-vsctl -f csv --no-heading -d bare --columns=other_config list port
@ostcar
ostcar / inyoka_dev.yml
Created October 13, 2015 14:45
systemd-nspawn config for inyoka providing mysql and redis
---
- hosts: inyoka_dev
tasks:
- name: enable network
service:
name: "{{ item }}"
state: started
enabled: yes
with_items:
@nathanielc
nathanielc / gist:9b98350ccbcbf21256d7
Created August 20, 2014 05:07
Minecraft systemd unit file
[root@plex ~]# cat /etc/systemd/system/minecraft@.service
[Unit]
Description=Minecraft Server %i
[Service]
WorkingDirectory=/opt/minecraft-%i
User=mcserver
ExecStart=/usr/bin/screen -DmS mc-%i /bin/java -Xmx2048M -jar minecraft_server.jar nogui
@shamil
shamil / mount_qcow2.md
Last active July 4, 2024 08:58
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@davewilson
davewilson / Play-Mario.ps1
Last active March 17, 2024 15:35
Super Mario Theme in PowerShell
Function Play-Mario {
[System.Console]::Beep(659, 125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(167);
[System.Console]::Beep(523, 125);
[System.Console]::Beep(659, 125);
[System.Threading.Thread]::Sleep(125);
[System.Console]::Beep(784, 125);