View contact.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get a recaptcha api key at http://www.google.com/recaptcha/whyrecaptcha | |
require_once("path/to/recaptchalib.php"); | |
$publickey = ""; | |
$privatekey = ""; | |
// see if the form has been submitted | |
if($_POST['submit']){ | |
// error checking | |
$errors = ''; |
View example.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require("postmark.php"); | |
$postmark = new Postmark("your-api-key","from-email","optional-reply-to-address"); | |
if($postmark->to("reciver@example.com")->subject("Email Subject")->plain_message("This is a plain text message.")->send()){ | |
echo "Message sent"; | |
} |
View index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once('lastfm.php'); | |
$lastfm = new LastFm('your-api-key'); | |
$params = array( | |
'user' => 'mloberg' | |
); | |
print_r($lastfm->call('user.getInfo', $params)); |
View watermark.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="watermark.php?watermark=watermark.png&src=test.jpg" /> |
View jquery.loader.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.load = function(options){ | |
// check for something to load | |
if(options.src === undefined) return; | |
// load dependencies | |
if(options.deps !== undefined){ | |
$.each(options.deps, function(key, value){ | |
var type = value.split(".")[value.split(".").length - 1]; | |
if(type === "js"){ | |
$.getScript(value); |
View mysql.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Mysql{ | |
static private $link = null; | |
static private $info = array( | |
'last_query' => null, | |
'num_rows' => null, | |
'insert_id' => null | |
); |
View postmark.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Send emails with Postmark (http://postmarkapp.com) | |
* | |
* Author: Matthew Loberg | |
* Author Twitter: @mloberg | |
* Author Website: http://mloberg.com | |
*/ | |
View File.Upload.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
name: [File.Upload, Request.File] | |
description: Ajax file upload with MooTools. | |
license: MIT-style license | |
author: Matthew Loberg | |
requires: [Request] | |
provides: [File.Upload, Request.File] | |
credits: Based off of MooTools-Form-Upload (https://github.com/arian/mootools-form-upload/) by Arian Stolwijk |
View Popcorn.SourceCode.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Popcorn SourceCode Plugin v0.1 | |
* http://mattwritescode.com/2011/11/popcorn-source-code-plugin/ | |
* | |
* Copyright 2011 Matthew Loberg (http://mloberg.com) | |
* Licensed under the MIT license | |
* | |
* Description: | |
* Add source code pre/code element to the page. | |
* If Google Code Prettify <http://code.google.com/p/google-code-prettify/> |
View aacinfo.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Name: AACInfo | |
# Author: Matthew Loberg | |
# Author URL: http://twitter.com/mloberg | |
# Description: | |
# I couldn't get MP4Info to read the tags of my iTunes music files, so I created this little class. | |
# It uses faad to get the tag info, so make sure it's installed (brew install faad2) | |
require 'iconv' | |
class AACInfo |
OlderNewer