Skip to content
View responsive-github-com.css
.wrapper .header,
.site-footer {
min-width: auto;
padding: 10px;
}
body .container {
max-width: 980px;
width: auto;
}
View officeOfHelena.js
/*! Closing the Door by Martin Adamko (c) 2014, MIT Licence */
var officeOfHelena = {
person: {
name: "Helena",
surname: "Székhelyi"
}
};
(function(office) {
View content.yaml
---
################################################################################
#
# COLLECTIONS
#
################################################################################
_id: homepage
_type: collection
route: /
template: homepage
View composer.json
{
"name": "attitude/Functions/generate_slug",
"autoload": {
"files": ["function-generate_slug.php"]
}
}
View composer.json
{
"name": "attitude/Functions/is_assoc_array",
"autoload": {
"files": ["function-is_assoc_array.php"]
}
}
View wp-json-api-post-meta.diff
diff --git a/lib/class-wp-json-posts.php b/lib/class-wp-json-posts.php
index e440b25..59c6bfd 100644
--- a/lib/class-wp-json-posts.php
+++ b/lib/class-wp-json-posts.php
@@ -847,14 +847,57 @@ class WP_JSON_Posts {
return $can_insert;
}
- // Post meta
- // TODO: implement this
View closing-connection-early-page-load-speed-tip.md

Page Speed Tip: Defer time consuming processes after sending the page output

Recently I have written a PHP class to try server analytics. But using the UAMP, script has to wait for response from Google's servers in order to close the connection. Even if the response took less than 100ms, still it's unnecessary time for client to wait and show loading spinner and block page render.

There is a space for optimisation: closing connection early and present the client with the response before the script finishes it's run.

View on-git-read-tree-and-dependencies.md

Here is a quick tip on pulling dependencies in your project using git read-tree command.

The Problem

How to use a single component from some library (eg. Form from Symfony), but not the whole library (tried the git submodule ?).

  1. Init project:

    Create a new project and init Git:

View Runnig PHP v5.3 in MAMP.md

Introduction

Lately I needed to test some code against PHP version 5.3 wich is (hopefully not forever) the highest supported version on one of my clients hosting right now. To cut the story short, I develop and test on a local MAMP server, usualy for PHP v5.4+. The free version of MAMP will let you run either v5.4.4 or v5.2.17 of PHP. To run other version you need to purchase MAMP Pro. But I haven't read/heard a single person saing about MAMP Pro worth its price tag.

Setup

My MAMP installation comes with many PHP versions preinstalled. See /Applications/MAMP/conf (Cmd+G), but you can swich only between two: the lowest and the heighest version of PHP. No option between. There are these versions in my MAMP/conf folder:

View function-get_pagination_data.php
<?php
/**
* Returns {{mustache}} ready data for pagination
*
* Pagination array for `prev`, `next`, `start`, `end` and `jump`
* to direct pages
*
* @author Martin Adamko <@martin_adamko>
* @licence The MIT Licence <http://opensource.org/licenses/MIT>
Something went wrong with that request. Please try again.