Skip to content

Instantly share code, notes, and snippets.

View Micronarrativ's full-sized avatar

Micronarrativ

View GitHub Profile
@Micronarrativ
Micronarrativ / mt-vagrantnw
Created December 20, 2017 18:48
Script to show the configured IP addresses in a Vagrantfile
#!/usr/bin/env ruby
# 2017-11-27/dbv
# Script to parse a vagrant file and return the configured network addresses
#
# Can sort by node name (default) or confiured ip.
#
require 'thor'
class Vagrant < Thor
class_option 'sort-by-node', :aliases => '-n', :type => :boolean, :required => false, :desc => 'Sort output by node name.'
@Micronarrativ
Micronarrativ / moc.log.rb
Created January 1, 2016 19:51
MOCP Logging into Log-file or playlist
#!/usr/bin/env ruby
# 2016-01-01
# Script to log the played songs from MOCP into a logfile or into a playlist.
#
require 'rubygems'
require 'thor'
module MocpLogger
class MocpLogger < Thor
#!/usr/bin/env ruby
# 20150922/JT
# Parse twitter feed to rss
#
# Input: twitter handle
# Output: xml
#
require 'nokogiri'
require 'open-uri'
require 'rss'
@Micronarrativ
Micronarrativ / keepassx2csv.rb
Created June 9, 2014 11:35
Converts KeepassX-XML export file to CSV file.
#!/usr/bin/ruby
# file: keepassx2csv.rb
#
# [*Description*]
# Exporting Password entries from a XML export of KeepassX to CSV
# The script will take care of the following fields:
# - Title
# - Username
# - Password
# - URL
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import re
from lxml import etree
import StringIO
import sys
reload(sys)