Skip to content

Instantly share code, notes, and snippets.

View slash3b's full-sized avatar

ilya slash3b

View GitHub Profile
@slash3b
slash3b / symfony.phpunit.xml
Created October 30, 2016 08:41 — forked from havvg/symfony.phpunit.xml
An example PHPUnit configuration file for symfony projects running on 512MB phpUnderControl server
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="true">
<filter>
<blacklist>
# will generate all necessary getters and setters
sf doctrine:generate:entities AppBundle/Entity/Product # sf is the alias for bin/console
# executes the SQL statements needed to update the database schema to where it should be. It should not be used in a production environment.
sf doctrine:schema:update --force
set -g default-terminal "screen-256color"
# change prefix command to C-z
set -g prefix C-z
unbind C-b
bind C-z last-window
bind z send-prefix
# setup | and - for window splitting
unbind %
bind | split-window -h
// Meta
get_post_custom() // Retrieve post meta fields, based on post ID.
// Page
get_queried_object() // get current page object
get_queried_object_id() // get current page ID
wp_title() // Display or retrieve page title for all areas of blog.
// Post
get_the_post_thumbnail()
// example of JS buffer via closure
function makeBuffer() {
var value = '';
function buffer ( plus ) {
if (typeof plus !== 'undefined') {
plus = plus.toString();
value += plus;