These gists will help through the installation of PHP54, MySQL, and Postgres
This assumes that you have already installed Homebrew (http://mxcl.github.io/homebrew/)
// Plugin | |
$.fn.iWouldLikeToAbsolutelyPositionThingsInsideOfFrickingTableCellsPlease = function() { | |
var $el; | |
return this.each(function() { | |
$el = $(this); | |
var newDiv = $("<div />", { | |
"class": "innerWrapper", | |
"css" : { | |
"height" : $el.height(), | |
"width" : "100%", |
<?php | |
/* | |
Template Name: Comment Graph | |
*/ | |
?> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8> |
!function (Backbone) { | |
// Store blank stuff here | |
var blankEl = $() | |
, blankModel = new Backbone.Model.extend() | |
, blankCollection = new Backbone.Collection.extend({ | |
model: blankModel | |
}) | |
, blankView = new Backbone.View.extend({ | |
el: blankEl | |
}) |
import os | |
import sys | |
import pickle | |
import console | |
import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
STATE_FILE = '.dropbox_state' | |
class dropbox_state: |
# Image Effects | |
# Demonstrates some effects using different modules | |
# from the Python Imaging Library (PIL). | |
# | |
# Tip: You can touch and hold an image in the output | |
# to copy it to the clipboard or save it to your | |
# camera roll. | |
import Image, ImageOps, ImageFilter | |
from Image import BILINEAR |
<?php | |
require_once('mailer/class.phpmailer.php'); | |
$myName = "YourName"; | |
$email_pattern = "/^([a-z0-9\.\-\+\_\']+)@[a-z0-9\-\+\_]+\.[a-z0-9\-\+\_]*(\.?)[a-z0-9]+$/"; | |
$email_address = trim($_POST['Body']); | |
$email = new PHPMailer(); | |
$email->From = 'FromEmail'; | |
$email->AddReplyTo('FromEmail', $myName); | |
$email->Mailer = 'mail'; |
/* | |
* Default WP Alignment Classes | |
*****************************************************************************/ | |
.aligncenter,.alignleft,.alignright { | |
display: block; | |
padding: 0; | |
} | |
.aligncenter { |
<?php | |
/** | |
* Retrieves the thumbnail URL to use for a post | |
* @param string $text The body of the post (get_content) | |
* @param string $size The image size to retrieve | |
* @return string The image URL to use | |
*/ | |
function get_thumb_url($text, $size){ | |
global $post; | |
$imageurl = FALSE; |
These gists will help through the installation of PHP54, MySQL, and Postgres
This assumes that you have already installed Homebrew (http://mxcl.github.io/homebrew/)
<?php | |
$email = "me@example.com"; | |
// To find your weather feed.... | |
// * Go here: http://forecast.weather.gov/MapClick.php?lat=37.7749295&lon=-122.41941550000001#.UdpHAj7714E | |
// * Search for your location (upper left side of the page as of 7/7/2013) | |
// * Click the orange "XML" button/link (on the right hand side, beneath the first map as of the same date) | |
$feed = 'http://forecast.weather.gov/MapClick.php?lat=39.01000&lon=-96.28&unit=0&lg=english&FcstType=dwml'; |