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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Main Rule" stopProcessing="true"> | |
<match url=".*" /> | |
<conditions logicalGrouping="MatchAll"> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> |
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
// create a new Post in WordPress | |
var post = new Post | |
{ | |
PostType = "post", // "post" or "page" | |
Title = "Using WordPressSharp", | |
Content = "WordPressSharp is a C# utility for interfacing with the WordPress XML-RPC API", | |
PublishDateTime = DateTime.Now, | |
Status = "publish" // "draft" or "publish" | |
}; |
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
public class GithubController : Controller | |
{ | |
/// <summary> | |
/// Github OAuth Callback | |
/// </summary> | |
/// <param name="code"></param> | |
/// <returns></returns> | |
public JsonResult callback(string code) | |
{ | |
var clientId = "[insert yours]"; |
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
# This is a template .gitignore file for git-managed WordPress projects. | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your | |
# content. Or see git's documentation for more info on .gitignore files: |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Simple KnockoutJS Paging With DataTables.net</title> | |
<!-- Bootstrap --> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> |
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 | |
// CATEGORY SINGLE TEMPLATES :: single-{category_slug}.php | |
add_filter( 'single_template', | |
create_function( '$t', 'foreach( (array) get_the_category() as $cat ) { | |
if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") ) return TEMPLATEPATH . "/single-{$cat->slug}.php"; | |
} return $t;' ) ); | |
// Example |
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
/* code inspired by Luciano Mammino via http://bit.ly/1KoCOjM */ | |
'use strict'; | |
var util = require('util'); | |
var path = require('path'); | |
var Bot = require('slackbots'); | |
var WP = require( 'wordpress-rest-api' ); | |
/** |
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
'use strict'; | |
var messages = [ | |
'Giddyup', | |
'Isosceles. You know, I love the name Isosceles. If I had a kid, I would name him Isosceles. Isosceles Kramer.', | |
'You know what you are? You’re an anti-dentite! It starts with a few jokes and slurs… ‘HEY DENTY!’ Then you will say that dentists should have their own schools!', | |
'Have you ever met a proctologist? They usually have a very good sense of humor. You meet a proctologist at a party, don’t walk away. Plant yourself there because you will hear the funniest stories you’ve ever heard.', | |
'What do you think Junior? You think these hands – they’ve been soaking in Ivory Liquid?', | |
'http://i.giphy.com/aMh59aKR8vjdC.gif' | |
]; |
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: WP Slack Slash Command Example | |
* Description: An example of using the WordPress REST API as a backend for a Slack Slash Command | |
* Author: Andy Brudtkuhl | |
* Author URI: http://youmetandy.com | |
* Version: 0.1 | |
* Plugin URI: https://github.com/abrudtkuhl/wp-slack-slash-command | |
* License: GPL2+ |
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: Posterous Importer | |
Plugin URI: http://wordpress.org/extend/plugins/posterous-importer/ | |
Description: Import posts, comments, tags, and attachments from a Posterous.com blog. | |
Author: Automattic, Brian Colinger, Peter Westwood, Daryl L. L. Houston | |
Author URI: http://automattic.com/ | |
Version: 0.10 | |
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
*/ |