- Install Ruby 2.4.3 via RubyInstaller (not 2.5, conflicts with things later)
- Let it install MSYS2 or do it yourself.
gem install bundlergem install github-pages(this includesjekyllitself and is where things break most)jekyll -v(3.6.2at the time of writing, a little behind latest3.7)jekyll new myblog- Edit
myblog/Gemfileto comment outjekyllline and uncommentgithub-pagesline.
This file contains hidden or 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
| { | |
| "name": "yoast/facebook-util", | |
| "require": { | |
| "symfony/dom-crawler": "^2.6", | |
| "symfony/css-selector": "^2.6" | |
| } | |
| } |
This file contains hidden or 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 | |
| add_filter('gettext',fn($t)=> | |
| @$t[4]&&@$GLOBALS['wp_locale'] | |
| ?["Such $t","Very $t",'Wow'][rand(0,2)] | |
| :$t); |
This file contains hidden or 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 | |
| $php_max = 7.0; | |
| $php_min = 5.2; | |
| $php_versions = array_filter( range( $php_max, $php_min + 0.1, 0.1 ), function ( $version ) { | |
| return version_compare( $version, 5.6, '<=' ) || version_compare( $version, 7.0, '>=' ); | |
| } ); | |
| $wp_max = 4.6; |
This file contains hidden or 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 RoboFile extends \Robo\Tasks { | |
| /** | |
| * Creates release zip | |
| * | |
| * @param string $package Composer package in vendor/name format. | |
| * @param string $version Version to build. | |
| */ |
This file contains hidden or 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 | |
| $bench = new Ubench(); | |
| $total = 15000; | |
| $count = 10; | |
| $sql = " | |
| SELECT l.ID, post_title, post_content, post_name, post_parent, post_author, post_modified_gmt, post_date, post_date_gmt | |
| FROM ( | |
| SELECT {$wpdb->posts}.ID |
This file contains hidden or 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 | |
| add_action( 'shutdown', function () { | |
| if ( ! defined( 'WPSEO_PATH' ) ) { | |
| return; | |
| } | |
| $path = str_replace( '\\', '/', WPSEO_PATH ); | |
| $includes = array_reduce( get_included_files(), function ( $plugin_includes, $include_path ) use ( $path ) { |
This file contains hidden or 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
| .heading-line-height( @line-height ) when ( @line-height < 1 ) { | |
| line-height: unit(@line-height * 2, em); | |
| } | |
| .heading-line-height( @line-height ) when ( @line-height >= 1 ) { | |
| line-height: unit(@line-height, em); | |
| } | |
| .heading-rhythm ( @font-size-base, @font-size-increase ) { | |
| @heading-font-size: @font-size-base * @font-size-increase; |
This file contains hidden or 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 | |
| add_action( 'template_redirect', function () { | |
| if ( ! isset( $_GET['crash'] ) ) { | |
| return; | |
| } | |
| $urls = []; |
This file contains hidden or 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
| filter: | |
| excluded_paths: | |
| - 'tests/*' | |
| checks: | |
| php: true | |
| build: | |
| environment: | |
| php: | |
| version: 7.2 | |
| dependencies: |