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
<style> | |
.main, .sidebar { | |
float: none; | |
padding: 20px; | |
vertical-align: top; | |
} | |
.container { | |
display: table; | |
} | |
.main { |
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 echo get_post_meta($post->ID, 'pubname', true); ?> | |
<?php if ( $pubname ) : ?> | |
<div id="pub"><?php echo $pubname; ?></div> | |
<?php else : ?> | |
<?php endif; ?> |
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 | |
/* | |
Plugin Name: Random Posts Query | |
Description: Imparts random display functionality to posts generated via | |
query_posts in older versions of WordPress (especially great for version 2.3) | |
Author URI: http://wordpress.org/support/topic/70359?replies=3#post-444323 | |
*/ | |
// usage: include "random=true" as a parameter in your query_posts loop |
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
<div id="fb-root"></div> | |
<Script> | |
FB.init({appId:'200416043320418', xfbml:true}); | |
fb.canvas.setautoresize(); | |
</Script> | |
<script> | |
window.fbAsyncInit = 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
Optional code for Udacity ST101 | |
6. Programming Charts | |
6.3 Plot Height | |
#Plot a histogram of Height using the histplot function | |
from plotting import * | |
Height=[65.78, 71.52, 69.4, 68.22, 67.79, 68.7, 69.8, 70.01, 67.9, 66.78, |
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
/* Script to count number of tweets since yesterday and trigger an email reminding user to write a blog post if the user has tweeted more than X times. */ | |
<?php | |
$yesterday = strtotime("-1 day", strtotime("now")); | |
$searchdate = date("Y-m-d", $yesterday); | |
$hashtag = 'from:username since:'.$searchdate; | |
$total = 0; | |
function getTweets($hashtag, $page) { | |
global $total, $hashtag; | |
$url = 'http://search.twitter.com/search.json?q='.urlencode($hashtag).'&'; |
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
<html> | |
<body style="background-color:#807F83;" bgcolor="#807F83"> | |
<div style="background-color:#ffffff; width:640px; margin:0px auto;" align="center" bgcolor="#ffffff"> | |
<table border="0" cellspace="0" cellpadding="0" width="600" bgcolor="#ffffff" style="border-collapse:collapse; background-color:#ffffff;" align="center"> | |
<tr> | |
<td colspan="2"> | |
[[?x42x::x[[S4]]x:: :: ]] | |
<p style="font-size: 12px; color: #333333; font-family: 'Trebuchet MS';">Is this email not displaying correctly? <a class="blue" style="color: #54b948;" href="http://[[S29:DOMAIN]]/site/MessageViewer" target="_blank">View it in your browser</a>.</p> | |
</td> | |
</tr> |
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
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$.getJSON('http://search.twitter.com/search.json?q=earthquake&callback=?', function(data) { | |
var data = data.results; | |
var html = "<ul>"; | |
for(var i=0; i<data.length; i++) { | |
html += "<li><a href='http://twitter.com/" + data[i].from_user + "'>@" + data[i].from_user + "</a>: " + data[i].text + "</li>"; |