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: Custom PPP | |
Plugin URI: | |
Description: Posts per page for Custom Post Type and Taxonomy | |
Version: 0.6 | |
Author: Toro_Unit | |
Author URI: http://www.torounit.com | |
License: GPL2 or Later | |
*/ |
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 | |
Class Assets_Init extends Singleton { | |
public $styles; | |
public $scripts; | |
public $prefetch; | |
protected function initialize() { |
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
module.exports = (grunt) -> | |
pkg = grunt.file.readJSON("package.json") | |
# | |
# taskをロード | |
# | |
for taskName of pkg.devDependencies | |
grunt.loadNpmTasks taskName if taskName.substring(0, 6) is "grunt-" |
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
// | |
// ================================= | |
// | |
// #Layout Grid Mix-in. | |
// | |
// ##Params | |
// * $unitClassName グリッドのclass名 | |
// * $maxCols カラムの分割数 | |
// * $width 横幅 |
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
module.exports = (grunt) -> | |
# ================================== | |
# | |
# Load Tasks. | |
# | |
# ================================== | |
pkg = grunt.file.readJSON('package.json') | |
for taskName of pkg.devDependencies |
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 | |
Class Tweets extends ArrayObject { | |
public function __construct( Array $tweets ) { | |
foreach($tweets as $key => $tweet) { | |
$this->offsetSet($key, $this->createTweet($tweet)); | |
} | |
} |
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
helpers do | |
def image_tag(path,params = {}) | |
if !params.key?(:srcset) | |
basename = File.basename(path, '.*') | |
ext = File.extname(path) | |
real_path = path.sub(basename + ext,basename + "@2x" + ext ) | |
real_path = File.join(images_dir, real_path) unless real_path.start_with?('/') |
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
@function rem($size) { | |
@return #{$size / $base-fontSize}rem; | |
} | |
@mixin font-size($size) { | |
font-size: $size; | |
font-size: rem($size); | |
} | |
@mixin line-height($size) { |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
do($=jQuery) => | |
$(".l-navigation__item").find("a").each -> | |
origin = location.origin | |
href = @.href.replace origin, "" | |
dir = href.replace "index.html", "" | |
if dir == "/" or dir == "" | |
#TOPの場合。 | |
pathname = location.pathname.replace "index.html", "" | |
if pathname == "/" or pathname == "" |