Skip to content

Instantly share code, notes, and snippets.

View arbales's full-sized avatar

Austin Bales arbales

View GitHub Profile
<?php
/*******************************************************************************
* PHP Paypal IPN Integration Class
*******************************************************************************
* Editor: Austin Bales
*
* Author: Micah Carrick
* Email: email@micahcarrick.com
* Website: http://www.micahcarrick.com
*
def send_upload_email(pcode, email)
begin
@pcode = pcode
Pony.mail(:to=>email,
:from => 'Pris.ma <do-not-reply@pris.ma>',
:subject=> "You uploaded a file on Pris.ma!",
:body => erb(:upload_email),
:via => :smtp, :smtp => {
:host => 'smtp.gmail.com',
:port => '587',
def send_upload_email(pcode, email)
begin
@pcode = pcode
Pony.mail(:to=>email,
:from => 'Pris.ma <do-not-reply@pris.ma>',
:subject=> "You uploaded a file on Pris.ma!",
:body => erb(:upload_email),
:via => :smtp, :smtp => {
:host => 'smtp.gmail.com',
:port => '587',
/*
* 417east Messaging
*
* Copyright (c) 2009 Austin Robert Bales
* Licensed under the LGPL license.
*
*/
message_index=0;
var Message = Class.create({
initialize:function(messageText,className, clickToDismiss){
<?php
/*
* Re-routes to http://id75.cmustudents.org
*
*/
header('Location: http://id75.cmustudents.org');
#!/usr/bin/env ruby
#
# A one file test to show ...
require 'rubygems'
require 'dm-core'
# setup the logger
DataMapper::Logger.new(STDOUT, :debug)
#!/usr/bin/env ruby -Ku
# encoding: utf-8
require 'rubygems'
require 'dm-core'
DataMapper::Logger.new($stdout, :debug)
DataMapper.setup(:default, 'sqlite3::memory:')
#!/usr/bin/env ruby -Ku
# encoding: utf-8
require 'rubygems'
require 'dm-core'
require 'dm-types'
DataMapper::Logger.new($stdout, :debug)
class Table
include DataMapper::Resource
property :id, Serial
property :name, String
# Relationship to the join table.
has n, :tableBookings
# Defines that Table has bookings in :tableBookings on the :booking named relationship. (a)
@arbales
arbales / gist:264337
Created December 27, 2009 17:22 — forked from arbales/gist:261484
#!/usr/bin/env ruby -Ku
# encoding: utf-8
require 'rubygems'
require 'dm-core'
require 'dm-types'
DataMapper::Logger.new($stdout, :debug)
DataMapper.setup(:default, "sqlite3:///#{Dir.pwd}/examine.db")