Skip to content

Instantly share code, notes, and snippets.

View ryarwood's full-sized avatar

Russell Yarwood ryarwood

View GitHub Profile
@ryarwood
ryarwood / example.php
Last active January 31, 2023 19:25 — forked from drewjoh/example.php
A Simple Postmark PHP Class with Attachments
<?php
require("postmark.php");
$postmark = new Postmark("your-api-key","from-email","optional-reply-to-address");
$result = $postmark->to("reciver@example.com")
->subject("Email Subject")
->plain_message("This is a plain text message.")
->attachment('File.pdf', $file_as_string, 'application/pdf')
@ryarwood
ryarwood / change-dom.js
Last active February 3, 2016 17:31 — forked from anonymous/file1.ab
Change DOM elements with jquery on screen re-size
(function( $ ){
$.fn.resize = function(max_size)
{
return this.each(function()
{
//Wait until the image is loaded
$(this).load(function()
{
//Create a container div
var div_container = $("<div></div>");