Skip to content

Instantly share code, notes, and snippets.

View sanbornm's full-sized avatar

Mark sanbornm

View GitHub Profile
@sanbornm
sanbornm / example.go
Created June 2, 2016 15:23 — forked from kavu/example.go
Minimal Golang + Cocoa application using CGO. Build with `CC=clang go build`
package main
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Cocoa
#import <Cocoa/Cocoa.h>
int
StartApp(void) {
[NSAutoreleasePool new];
@sanbornm
sanbornm / gist:187815
Created September 16, 2009 02:07 — forked from eriwen/gist:187610
# Sample usage: "checksites.py eriwen.com nixtutor.com ..."
import pickle, os, sys, logging
from httplib import HTTPConnection
from smtplib import SMTP
def email_alert(alert,subject='You have an alert'):
fromaddr = "youremail@domain.com"
toaddrs = "youremail@domain.com"