Skip to content

Instantly share code, notes, and snippets.

View peterfroehlich's full-sized avatar

Peter Fröhlich peterfroehlich

  • gutefrage.net GmbH
  • Munich, Germany
View GitHub Profile
@baliw
baliw / mlnotifications.py
Created November 5, 2012 21:53
Mountain Lion Notification Center via Python
import Foundation
import objc
import AppKit
import sys
NSUserNotification = objc.lookUpClass('NSUserNotification')
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')
def notify(title, subtitle, info_text, delay=0, sound=False, userInfo={}):
notification = NSUserNotification.alloc().init()
@derlinkshaender
derlinkshaender / README.rst
Created July 14, 2013 20:16
Log message to graylog using Python and the graypy package.

graylogger

Introduction

graylogger is a python script born out of necessity. Use graylogger.py to send GELF-formatted messages to a graylog host. You may log string messages, file contents or read from stdin, add additional fields. Host name and timestamp will be provided