This file contains hidden or 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
## OS and Utility Stuff ## | |
#==================# | |
# OS Files # | |
#==================# | |
.DS_Store | |
.DS_Store? | |
._* | |
.Spotlight-V100 | |
.Trashes |
This file contains hidden or 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
$(document).ready(function () { | |
"use strict" | |
//indexOf is not supported by IE9>. | |
if (!Array.prototype.indexOf){ | |
Array.prototype.indexOf = function(elt /*, from*/){ | |
var len = this.length >>> 0; | |
var from = Number(arguments[1]) || 0; | |
from = (from < 0) | |
? Math.ceil(from) |
This file contains hidden or 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
<div id="videoBoxList"> | |
<ul> | |
<li><a href="javascript:showFeature('videoBox1','qFKHjfVz1IQ');" id="videoBox1"><span class="videoBoxNumber">Video No. 1</span><br />O'Neill Girls 2012</a></li> | |
<li><a href="javascript:showFeature('videoBox2','TeqdCYYvLAk');" id="videoBox2"><span class="videoBoxNumber">Video No. 2</span><br />O'Neill Kings of Freak</a></li> | |
<li><a href="javascript:showFeature('videoBox3','QvGZxMH9e2c');" id="videoBox3"><span class="videoBoxNumber">Video No. 3</span><br />Sofia Z Shoes</a></li> | |
<li><a href="javascript:showFeature('videoBox4','_MCcy3_sWcI');" id="videoBox4"><span class="videoBoxNumber">Video No. 4</span><br />O'Neill Womens Fall/Holiday 2014</a></li> | |
<li><a href="javascript:showFeature('videoBox5','7PiNTX9adZk');" id="videoBox5"><span class="videoBoxNumber">Video No. 5</span><br />Rob Rojas - A Paddlers Perspective</a></li> | |
<li><a href="javascript:showFeature('videoBox6','auM_-QglpnE');" id="videoBox6"><span class="videoBoxNumber">Video No. 6</span><br />O'Neill "End of |
This file contains hidden or 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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
function ftp_uploaddirectory($conn_id, $local_dir, $remote_dir) | |
{ | |
ftp_mkdir($conn_id, $remote_dir); | |
$handle = opendir($local_dir); | |
while (($file = readdir($handle)) !== false) |
This file contains hidden or 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
add_filter( 'the_content', 'attachment_image_link_remove_filter' ); | |
function attachment_image_link_remove_filter( $content ) { | |
$content = | |
preg_replace( | |
array('{<a(.*?)(wp-att|wp-content\/uploads)[^>]*><img}', | |
'{ wp-image-[0-9]*" /></a>}'), | |
array('<img','" />'), | |
$content | |
); |
This file contains hidden or 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_once 'mime.php'; // fix path dummy! | |
$mail = array(); | |
$mail['sender'] = $_POST['email']; | |
$mail['recipient'] = $_POST['communityEmail']; | |
$mail['subject'] = '--New Email Lead for '.$_POST['communityName'].'--'; | |
$mail['header'] = sprintf("From: %s\n", $mail['sender']); | |
$mail['header'] .= sprintf("Reply-To: %s",$mail['sender']); |
This file contains hidden or 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
/* set vars */ | |
$numbers = range(1, 9); | |
shuffle($numbers); | |
$imgString = "/img/header-side-default"; | |
/* loop */ | |
foreach($numbers as $arr) { | |
$i++; | |
echo '<img src="'.$imgString.$arr.'.jpg" width="715" height="320" />'; | |
if ($i == 3) break; /* change 3 to how many you want! */ |
This file contains hidden or 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 | |
/** | |
* @package WordPress | |
* @subpackage p11news | |
*/ | |
remove_filter('get_the_excerpt', 'wp_trim_excerpt'); | |
add_filter('get_the_excerpt', 'custom_trim_excerpt'); | |
function custom_trim_excerpt($text) { // Fakes an excerpt if needed |
This file contains hidden or 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
<!--head--> | |
<!--head--> | |
<!--body--> | |
<item> | |
<date>[date][time]</date> | |
<title>[title]</title> | |
<description><![CDATA[[descr]]]></description> | |
</item> | |
<!--body--> | |
<!--foot--> |
This file contains hidden or 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 | |
/* outputs array */ | |
$query = "SHOW TABLE STATUS LIKE 'tablename'"; | |
$result = mysql_query($query); | |
$row = mysql_fetch_assoc($result); | |
var_dump($row); | |
/* outputs number maybe :( */ |