Skip to content

Instantly share code, notes, and snippets.

View kaymccormick's full-sized avatar
🎯
Focusing

Kay McCormick kaymccormick

🎯
Focusing
View GitHub Profile
@kaymccormick
kaymccormick / ConsoleDumpWalker.cs
Created February 13, 2020 01:06 — forked from amazedsaint/ConsoleDumpWalker.cs
Syntax Tree Dumper using Roslyn SyntaxWalker
using System;
using System.Linq;
using Roslyn.Compilers.CSharp;
namespace RoslynApp
{
public static class SyntaxTreeExtensions
{
public static void Dump(this SyntaxTree tree)
@kaymccormick
kaymccormick / xsend
Created October 29, 2018 13:17 — forked from tskrynnyk/xsend
Command-line utility for sending jabber messages.
#!/usr/bin/python
# xsend: command-line utility for sending jabber messages
# http://xmpppy.sourceforge.net/
#
import sys,os,xmpp,time
if len(sys.argv) < 2:
print "Syntax: xsend JID msg"
sys.exit(0)
@kaymccormick
kaymccormick / pysyslog.py
Created October 21, 2018 13:24 — forked from marcelom/pysyslog.py
Tiny Python Syslog Server
#!/usr/bin/env python
## Tiny Syslog Server in Python.
##
## This is a tiny syslog server that is able to receive UDP based syslog
## entries on a specified port and save them to a file.
## That's it... it does nothing else...
## There are a few configuration parameters.
LOG_FILE = 'youlogfile.log'
@kaymccormick
kaymccormick / README
Last active August 3, 2018 20:27 — forked from leandrosilva/README
Parsing Syslog files with Python and PyParsing
$ python xlogd.py sample.log
parsed: {'appname': 'test.app', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '68898', 'priority': '132', 'message': 'bla bla bla warn'}
parsed: {'appname': 'test.app', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '68902', 'priority': '131', 'message': 'bla bla bla error'}
parsed: {'appname': 'Dock', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '154', 'priority': '11', 'message': 'CGSReleaseWindowList: called with 5 invalid window(s)'}
parsed: {'appname': 'WindowServer', 'timestamp': '2012-09-06 15:19:32', 'hostname': 'codezone.local', 'pid': '79', 'priority': '11', 'message': 'CGXSetWindowListAlpha: Invalid window 0'}