Skip to content

Instantly share code, notes, and snippets.

@urre
urre / example.md
Last active August 20, 2018 16:26
Example, Bedrock on Codeship

1. Initial setup

  • 1.1 First setup the ENV variables under Environment
  • 1.2 Authorize the project specific Codeship ssh key on the server. (under General)

2. Setup tab

phpenv local 7.2
@urre
urre / test.sh
Created February 2, 2018 10:32
composer test command
composer test
@urre
urre / setup.sh
Created February 2, 2018 10:31
codeship setup command
phpenv local 7.2
composer install --prefer-source --no-interaction
@urre
urre / output.sh
Created February 2, 2018 10:31
test output
FILE: ...rojects/myproject/myfile.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
34 | ERROR | [x] Expected 1 spaces before closing bracket; 0 found
36 | ERROR | All output should be run through an escaping function
| | (see the Security sections in the WordPress Developer
| | Handbooks), found '$image_src'.
90 | ERROR | [x] String "Create a Configuration File" does not require
| double quotes; use single quotes instead
"scripts": {
"post-install-cmd": "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"post-update-cmd" : "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"test": [
"phpcs --report=full --colors -p --standard=web/app/themes/mytheme/codesniffer-ruleset.xml --ignore=*/vendor/*,*/node_modules/* web/app/themes/mytheme/ --extensions=php"
]
}
@urre
urre / gist:e06e8113d3858842abe3135f9dc85f1e
Last active February 2, 2018 10:30
composer scripts
"scripts": {
"post-install-cmd": "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs",
"post-update-cmd" : "./vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs"
}
"require": {
"wp-coding-standards/wpcs": "^0.14.0",
}
composer require wp-coding-standards/wpcs
"require-dev": {
"squizlabs/php_codesniffer": "^3.0.2"
}
@urre
urre / gist:3341230
Created August 13, 2012 14:29
Delete WP-SEO columns
<?php
function my_columns_filter( $columns ) {
unset($columns['wpseo-focuskw']);
unset($columns['wpseo-metadesc']);
unset($columns['wpseo-score']);
unset($columns['wpseo-title']);
return $columns;
}