Skip to content

Instantly share code, notes, and snippets.

Avatar

Austin Bales arbales

View GitHub Profile
View paypal
<?php
/*******************************************************************************
* PHP Paypal IPN Integration Class
*******************************************************************************
* Editor: Austin Bales
*
* Author: Micah Carrick
* Email: email@micahcarrick.com
* Website: http://www.micahcarrick.com
*
View gist:197815
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',
View gist:197817
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',
View messaging.js
/*
* 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){
View index.php
<?php
/*
* Re-routes to http://id75.cmustudents.org
*
*/
header('Location: http://id75.cmustudents.org');
View standalone_example.rb
#!/usr/bin/env ruby
#
# A one file test to show ...
require 'rubygems'
require 'dm-core'
# setup the logger
DataMapper::Logger.new(STDOUT, :debug)
View standalone_example.rb
#!/usr/bin/env ruby -Ku
# encoding: utf-8
require 'rubygems'
require 'dm-core'
DataMapper::Logger.new($stdout, :debug)
DataMapper.setup(:default, 'sqlite3::memory:')
View gist:260782
#!/usr/bin/env ruby -Ku
# encoding: utf-8
require 'rubygems'
require 'dm-core'
require 'dm-types'
DataMapper::Logger.new($stdout, :debug)
View gist:261484
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)
View gist:264337
#!/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")