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
# useful nginx configuration for reverse proxy with Apache | |
# edit lines 8, 11, and 30 | |
# taken from: http://syslog.tv/2010/01/11/debian-apache-2-nginx-wordpress-mu/ | |
# edits by jakebellacera (http://github.com/jakebellacera && http://jakebellacera.com) | |
server { | |
listen 80; | |
server_name domain.com *.domain.com; # edit this to your domain |
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
// The Function | |
function dateToUnix($time) { | |
return date('U', strtotime($time)); | |
} | |
// Example: | |
// We need to convert a simple string to a UNIX timestamp. | |
$sampleDate = '9/15/2010 05:30'; |
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 | |
/** | |
* This is free and unencumbered software released into the public domain. | |
* | |
* Anyone is free to copy, modify, publish, use, compile, sell, or | |
* distribute this software, either in source code form or as a compiled | |
* binary, for any purpose, commercial or non-commercial, and by any | |
* means. | |
* |
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
/************************ | |
Columns | |
======= | |
General template for creating columns. | |
Usage | |
----- | |
To use, just set a parent div with three different classes: | |
* .columns -- this defines the column class |
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 | |
// RFLX <img> resize | |
// server-side image resizing | |
function rflx_img_resize($src, $width, $height, $mu = true, $zoom = true) { | |
if ($zoom) { | |
if ($zoom == false) { | |
$z = 0; | |
} else { | |
$z = 1; |
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
<!-- Begin 'ze form --> | |
<h2>Contact Form</h2> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | |
<form> | |
<div> | |
<fieldset> | |
<legend>Name & Stuff</legend> | |
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
/* | |
ajax-send.js - copyright Jake Bellacera (http://jakebellacera.com) | |
This script uses JQuery & JQuery Validate (https://github.com/jzaefferer/jquery-validation) | |
For this example, we will have a form named '#ajaxform', you can of course change this to whatever you'd like. | |
*/ | |
$(function(){ | |
$('#submitbutton').click(function() { |
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
<!-- Paste these in the head if you're using a splash page --> | |
<script src="/engine/js/jquery/jquery-1.4.2.js" type="text/javascript"></script> | |
<script type="text/javascript" src="/engine/js/swfobject/swfobject-2.2.js"></script> | |
<!-- The actual video --> | |
<div id="video_player">Loading...</div> | |
<script type="text/javascript"> | |
{literal} | |
var vars = {}; | |
var params = {}; |
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
/** | |
* Mail.js 1.1 | |
* =========== | |
* A simple AJAX emailer | |
*/ | |
$(function(){ | |
$('#mailform').validate({ | |
// Set rules for special fields (email/phone) | |
rules: { |
OlderNewer