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'); | |
$request_url = 'http://news.makerfaire.com/feed/'; | |
$xml = simplexml_load_file($request_url) or die('feed not loading'); | |
print_r($xml); | |
?> |
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_value max_execution_time 900 | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
AddDefaultCharset UTF-8 | |
# BEGIN SJA | |
RedirectMatch /.svn(/|$) https://encrypted.google.com/search?q=script+kiddie | |
RedirectMatch /readme.html https://encrypted.google.com/search?q=script+kiddie |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #fff, yellow); | |
min-height:100%; | |
border-radius:5px; | |
border-bottom:3px solid #0f0; |
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
error_reporting(E_ALL); | |
$url = 'http://makeprojects.com/Project/Kitty-Twitty-Cat-Toy/1439/1'; | |
function get_tweets($url) { | |
$json_string = file_get_contents('http://urls.api.twitter.com/1/urls/count.json?url=' . $url); | |
$json = json_decode($json_string, true); | |
return intval( $json['count'] ); |
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
( | |
[serial] => 3373 | |
[name] => Hackett | |
[company] => Madagascar Institute | |
[email] => [email protected] | |
[photo] => http://www.facebook.com/media/set/?set=a.124297057635228.19714.124295664302034#!/photo.php?fbid=1961 | |
[url] => | |
[twitter_name] => | |
[exhibit] => Array | |
( |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>MAKE | New Year Card for the Year of the Dragon</title> | |
<!-- Le HTML5 shim, for IE6-8 support of HTML elements --> | |
<!--[if lt IE 9]> | |
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> |
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
// 60 seconds * 60 minutes * 24 hours = 1 day refresh | |
$refreshInterval = 60*60*24; | |
$input = range(1,30); | |
$arr = array_rand($input, 4); | |
if ( false === ( $featured_products = get_transient( 'featured_products' ) ) ) { | |
// It wasn't there, so regenerate the data and save the transient | |
$request_url = 'http://makershed.com/net/webservice.aspx?api_name=generic\featured_products'; | |
$xml = simplexml_load_file($request_url); |
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_action( 'init', 'make_sopa_blackout' ); | |
function make_sopa_blackout() { | |
if ( ! is_admin() ) { | |
wp_redirect( 'http://oreilly.com/blackout.html', 302 ); | |
exit; | |
} | |
} |
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_action( 'init', 'make_sopa_blackout' ); | |
function make_sopa_blackout() { | |
if ( ! is_admin() ) { | |
$current_time = current_time( 'timestamp' ); | |
$start_time = strtotime( '01/17/2012 8:00' ); | |
$end_time = strtotime( '01/17/2012 20:00' ); | |
if( $current_time >= $start_time && $current_time <= $end_time ) { | |
wp_redirect( 'http://oreilly.com/make-blackout.html', 503 ); | |
exit; |
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 class="tabbable tabs-left"> | |
<ul class="nav nav-tabs"> | |
<li class="active"><a href="#lA" data-toggle="tab">Section 1</a></li> | |
<li class=""><a href="#lB" data-toggle="tab">Section 2</a></li> | |
<li class=""><a href="#lC" data-toggle="tab">Section 3</a></li> | |
</ul> | |
<div class="tab-content"> | |
<div class="tab-pane active" id="lA"> | |
<p>I'm in Section A.</p> | |
</div> |