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
var static = require('node-static'); | |
// | |
// Create a node-static server instance to serve the './public' folder | |
// | |
var file = new static.Server('./public'); | |
require('http').createServer(function (request, response) { | |
request.addListener('end', 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
/** | |
* Flexible Field layout | |
*/ | |
body { | |
background: #f4f4f4; | |
color: #444; | |
font: 16px/1.2em Helvetica, Arial, Sans-serif; | |
} |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
* { | |
margin: 0; | |
padding: 0 | |
} | |
ul { |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
* { | |
margin: 0; | |
padding: 0 | |
} | |
ul { |
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 test use Apiari.io REST sketch | |
### | |
class MyModel extends Backbone.Model | |
rootUrl: 'http://backbonecustomrest.apiary.io' | |
customUrls: | |
'read': '/my-path/1/get' | |
'create': '/my-path/1/create' | |
'update': '/my-path/1/update' | |
'delete': '/my-path/1/delete' |
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 | |
function _register_post_type( $post_type = '', $args = array() ) { | |
if ( empty( $post_type ) ) | |
return; | |
$singular = empty( $args['singular'] ) ? $post_type : $args['singular']; | |
$singular = str_replace( '_', ' ', $singular ); | |
$singular = ucwords( $singular ); | |
$plural = empty( $args['plural'] ) ? "{$singular}s" : $args['plural']; | |
$plural = ucwords( $plural ); |
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
/** | |
* get top level object terms | |
* @package default | |
* @version 1.0 | |
**/ | |
function _get_object_parent_terms ($object, $taxonomies, $args = array()) { | |
$object_terms = wp_get_object_terms($object, $taxonomies, $args); | |
$output = array(); |
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
/* Effectively Containing Floats · @shayhowe · http://www.shayhowe.com */ | |
.group:before, | |
.group:after { | |
content: ""; | |
display: table; | |
} | |
.group:after { | |
clear: both; | |
} |
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
/** | |
* Helper functions to add / remove array of terms | |
* | |
* @package MyTheme | |
* @since 1.0 | |
* | |
**/ | |
function _add_terms( $terms, $taxonomy = 'category' ) { | |
if ( !is_array($terms) || empty($terms)) return; | |
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 { | |
margin: 50px auto; | |
} | |
/** | |
* stitched-effect | |
*/ | |
.stitched-effect { | |
position: relative; | |
width: 300px; |
NewerOlder