Skip to content

Instantly share code, notes, and snippets.

View k0emt's full-sized avatar

Bryan Nehl k0emt

View GitHub Profile
@k0emt
k0emt / cities.xml
Created February 15, 2013 07:44
Example of XSLT Transformation with for-each-grouping. command to create: saxon -xsl:for-each-group.xsl -s:cities.xml > grouped_cities.xml
<cities>
<state>
<name>Alabama</name>
<city>Abbeville</city>
<number>1</number>
</state>
<state>
<name>Alabama</name>
<city>Adamsville</city>
<number>1</number>
@k0emt
k0emt / inline-svg.html
Last active February 21, 2021 17:53
Inline SVG, styled with CSS
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<style>
.label {
font-size: 2em;
@k0emt
k0emt / my_mongo.md
Last active March 21, 2022 02:44
Some helpful docker commands for working with mongoDB

Some helpful mongo container docker commands

Get latest image of mongoDB

docker pull mongo

Spin up a container and work with mongo

Spin up a new container named my_mongo from image mongo Mapping and exposing ports 27017-27019 from the container to the host OS: docker run -d -p 27017-27019:27017-27019 --name my_mongo mongo

@k0emt
k0emt / Experiment.py
Last active June 11, 2023 15:41
Basic Hello world in Python with corresponding unittest
__author__ = 'k0emt'
class Greeter:
def __init__(self):
self.message = 'Hello world'
# print self.message
@k0emt
k0emt / .vimrc
Last active January 3, 2024 17:43
vim configuration
filetype on
filetype plugin on
filetype indent on
syntax on
set number
set cursorline
set tabstop=4
set expandtab
set nowrap
set incsearch
@k0emt
k0emt / DarkMatterLogger.py
Created September 15, 2011 04:00
Demo code for RabbitMQ Publish/Subscribe (fanout) exchange with Python
import sys
import pika
# prerequisites are that you have RabbitMQ installed
# create a "darkmatter" named VirtualHost (VHOST)
# rabbitmqctl.bat add_vhost darkmatter
# create a user APP_USER with associated APP_PASS word
# rabbitmqctl add_user darkmatteradmin <password>
# give the APP_USER the necessary permissions
# rabbitmqctl set_permissions -p darkmatter darkmatteradmin ".*" ".*" ".*"
@k0emt
k0emt / kali-build-notes.md
Last active February 20, 2024 22:30
Notes around setting up a Raspberry Pi 5 with Kali Linux

Kali Linux build

Documenting Kali Linux on Raspberry Pi 5 build
Pi 5 with 8G of RAM and a 64G Samsung microSD
Case is aluminum heat sink style with a smart PWM fan
Initial set up with USB-C power, portable display, TrackPoint keyboard

System

  • change hostname