Skip to content

Instantly share code, notes, and snippets.

Juggling with curiosity

Igor Pellegrini Pictor13

  • BerlinOnline Stadtportal GmbH & Co. KG
  • Berlin
View GitHub Profile
Pictor13 / git-tag++
Last active Sep 12, 2018
Bash script to increment and add a new git-tag (according to 'semver') [e.g.: "git tag++ -p"]
View git-tag++
# Increment a version string using Semantic Versioning (SemVer) terminology, and adds it to git-tags
# - Customised from:
# INSTALL: put the script in a PATH directory. 'git' will recognize automatically the new command.
# USAGE: "git tag++ -p"
# "git tag++ -Mp"
# BEWARE: "git describe" returns the last-tag JUST for the current tree!
# if amend a commit the SHA will change and the eventual tag will still point to the old unchanged commit
Pictor13 /
Last active Jul 18, 2018
Notes about AgaviRouting
  • input parameters are the input in the querystring. extraParams dunno yet. usedParams are the params provided to url generation method.
  • agavi doesn't filter the just valid parameters; if you add &foo=bar it will end in the result of gen(nullRoute)
    • (any parameter to just pass the validated parameters?)
  • AgaviWEBrouting encodes with rawurlencode by default (to test it try to create an AgaviRoutingValue with routing->createValue. One of the params should be to explicitly choose encoding or not.
  • fillGenNullParameters() returns getMatchedParameters(), that are the $url_params passed to routing->gen(route, url_params) E.g. {"firstchar":"a","baseSearch":"ricerca","baseVenue":"luoghi","basePath":"\/it\/biglietti"}
Pictor13 / AgaviValidationManager-getErrorNames.php
Last active Jul 11, 2018
Override of AgaviValidationManager->getErrorNames() [that probably was forgotten to be implemented... ... anyway was deprecated]. Useful for retrieving the errors by the name that was used with 'throwError()' in the Validator or that is used for translations in the 'validate.xml'.
View AgaviValidationManager-getErrorNames.php
* Retrieve an array of error names.
* @return array An indexed array of error names.
* @author Igor Pellegrini <>
* @author Sean Kerr <>
* @author Dominik del Bondio <>
Pictor13 / Honeybee\Honeybee\AggregateRootCommandBuilder.php
Created Jul 5, 2018
To understand flatten() method. This is an example of hierarchy of errors resulted from validation of command_state generated by the command builder (state would be passed to created Command, if there wouldn't be errors.
View Honeybee\Honeybee\AggregateRootCommandBuilder.php
* Contains conventions for errors array format.
* Probably used just for errors array.
* ^.|.(not "values" or "embedded_entity_commands").(decimal|.)..
* eg key for attribute path: .book.2.
$errors = [
[ // error
Pictor13 / gist:696ccbff671393e2c912
Created Jan 29, 2015
"Compare to Stash..." custom comparision for Sublimerge
View gist:696ccbff671393e2c912
# Add the custom comparision "Compare to Stash..." to SublimeMerge plugin
# This allows to compare the current file with the version contained in a stash.
# Custom Comparisions.sublime-settings -- User
"custom_comparisons_user": [
"name": "Compare to Stash...",
"requires": "git",
"steps": [
You can’t perform that action at this time.