Skip to content

Instantly share code, notes, and snippets.

View exavolt's full-sized avatar

Rezal exavolt

View GitHub Profile
@exavolt
exavolt / lineintersection.as
Created February 24, 2012 08:45 — forked from painquin/lineintersection.as
Line segment intersection in AS3
// ported from http://alienryderflex.com/intersect/
public static function LineIntersection(a:Point, b:Point, c:Point, d:Point):Point
{
var distAB:Number, cos:Number, sin:Number, newX:Number, ABpos:Number;
if ((a.x == b.x && a.y == b.y) || (c.x == d.x && c.y == d.y)) return null;
if ( a == c || a == d || b == c || b == d ) return null;
b = b.clone();
@exavolt
exavolt / amazon_sender.py
Created January 21, 2012 02:17 — forked from amix/amazon_sender.py
Amazon SES helper script using boto
# -*- coding: utf-8 -*-
"""
amazon_sender.py
~~~~~~~~
Python helper class that can send emails using Amazon SES and boto.
The biggest feature of this class is that encodings are handled properly.
It can send both text and html emails.
This implementation is using Python's standard library (which opens up for a lot more options).