Skip to content

Instantly share code, notes, and snippets.

View ReessKennedy's full-sized avatar

Reess Kennedy ReessKennedy

View GitHub Profile
@eoghanobrien
eoghanobrien / asana-status-board-display.php
Last active December 17, 2015 06:19
Grabbing Project Tasks from Asana API
<table id="projects">
<?php foreach ($data as $project): ?>
<tr>
<td class="projectName">
<?php echo $project['name']; ?>
</td>
<td class="projectVersion noresize">
<?php echo sprintf('%s/%s', $project['completedCount'], $project['totalCount']); ?>
</td>
<td class="projectsBars">
@lots0logs
lots0logs / index.php
Created April 26, 2016 17:23
WordPress :: Divi Theme :: Show "read more" links on category/archive pages
<?php get_header(); ?>
<div id="main-content">
<div class="container">
<div id="content-area" class="clearfix">
<div id="left-area">
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
$post_format = et_pb_post_format(); ?>
@edsilv
edsilv / gist:5f40207ed75119b5eab5
Created February 1, 2015 17:55
extract svn .dump file
## use standard windows command prompt
cd C:\Program Files\SlikSvn\bin
mkdir c:\dumpRepo
svnadmin create c:\dumpRepo
type c:\myproject.dump | svnadmin load c:\dumpRepo
svn export file:///c:/dumpRepo c:\myproject
@jonathonbyrdziak
jonathonbyrdziak / AddressHelper.php
Created August 18, 2010 20:20
Parse Address :: This function is designed to parse a complete street address using PHP. If it can't figure out the parsing itself, then it sends the address to google to have google parse the street address.
<?php
/**
* @author Jonathon Byrd
* @package Address Parsing
*
*
*/
class AddressHelper extends ObjectBase
{
/**
@brendannee
brendannee / gist:7196251
Created October 28, 2013 12:48
Whitelist a Wordpress custom post type for use with the Jetpack JSON API using the `rest_api_allowed_post_types` filter. See http://developer.wordpress.com/docs/api/1/get/sites/%24site/posts/
function allow_my_post_types($allowed_post_types) {
$allowed_post_types[] = 'my_post_type';
return $allowed_post_types;
}
add_filter( 'rest_api_allowed_post_types', 'allow_my_post_types');
@stevenharman
stevenharman / generate_ssl_cert
Created August 16, 2013 14:41
Generate a self-signed cert, update your hosts file, and add it to your OS X Keychain for local SSL success!
#!/usr/bin/env sh
echo "Creating a self-signed certificate..."
openssl req -new -newkey rsa:2048 -sha1 -days 3650 -nodes -x509 -subj "/C=US/ST=Georgia/L=Atlanta/O=BNR/CN=localhost.ssl" -keyout config/server.key -out config/server.crt
if ! grep -q "\blocalhost\.ssl\b" /private/etc/hosts; then
echo "Adding localhost.ssl to your hosts file..."
echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts
fi
@jeffgolenski
jeffgolenski / WordPress Comment Styling SCSS
Last active October 19, 2022 14:25
SCSS WordPress Comment Styles. Based on the WordPress threaded comments CSS over at css-tricks.com, I created this nested SCSS. It's basic, simple, and clean. Quickly copy, paste, and style away! Original CSS located at: http://css-tricks.com/snippets/wordpress/base-threaded-comments-styling/
/* =========================================================
Comments
========================================================= */
ol.commentlist {
list-style:none;
margin:0 0 1em;
padding:0;
text-indent:0;
@Mithrandir0x
Mithrandir0x / Made of Code.tmTheme
Created February 29, 2012 16:42
Theme "Made of Code" for SublimeText2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>mkdynamic</string>
<key>name</key>
<string>Made of Code</string>
<key>settings</key>
<array>
@sniperwolf
sniperwolf / ajax.php
Last active December 29, 2022 12:25
Super-Simple WordPress ajax post-popup with jQuery and Reveal plugin
<?php
/**
* Template Name: ajax
*/
?>
<?php
$post = get_post($_GET['id']);
?>
<?php if ($post) : ?>
<?php setup_postdata($post); ?>
@bebaps
bebaps / rest-api-loop.php
Created February 22, 2017 01:26
Standard loop of posts using the WP REST API
<?php
// Standard API query arguments
$args = array(
'orderby' => 'title',
'per_page' => 3
);
// Put into the `add_query_arg();` to build a URL for use
// Just an alternative to manually typing the query string
$url = add_query_arg( $args, rest_url('wp/v2/posts') );