Skip to content

Instantly share code, notes, and snippets.

View jordanandree's full-sized avatar

Jordan Andree jordanandree

View GitHub Profile
<?php
function datetimeFormat( $date, $format )
{
$date = explode('-', $date);
$day = explode(' ', $date[2]);
$time = explode(':', $day[1]);
$day = $day[0];
$mktime = mktime($time[0] , $time[1], $time[2], $date[1], $day, $date[0]);
@jordanandree
jordanandree / dump.php
Created December 27, 2010 23:20
dump an object
<?php
function dump( $str ){
echo '<pre>'.print_r($str, false).'</pre>';
exit();
}
?>
<?php
// needed to load WP core
include '../../../wp-config.php';
if($_GET):
$id = $_GET['id'];
query_posts('p='.$id);
<a class="comments" rel="123" href="http://url-to-real-comments-page.com">View Comments</a>
<script type="text/javascript">
jQuery(document).ready(function($){
$('.comments').click(function(){
$.ajax({
type: 'get',
data: { id: $(this).attr('rel')},
<?php
require 'facebook.php';
function facebook_connect(){
// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
'appId' => '145062682199939',
@jordanandree
jordanandree / foo.php
Created September 2, 2010 21:14
what the foo
<?php
$foo = 'foo';
echo $foo == 'foo' ? 'yes' : 'no';
?>