- 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"}
This file contains 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
# 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": [ |
This file contains 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
/** | |
* 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 | |
] |
This file contains 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 | |
/** | |
* Retrieve an array of error names. | |
* | |
* @return array An indexed array of error names. | |
* | |
* @author Igor Pellegrini <[email protected]> | |
* @author Sean Kerr <[email protected]> | |
* @author Dominik del Bondio <[email protected]> |
This file contains 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
#!/bin/bash | |
# Increment a version string using Semantic Versioning (SemVer) terminology, and adds it to git-tags | |
# - Customised from: https://github.com/fmahnke/shell-semver/blob/master/increment_version.sh) | |
# 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 |
This file contains 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
// ==UserScript== | |
// @name remove-google-ads | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Remove ADs fake-search-results on Google SRP | |
// @author Igor Pellegrini | |
// @include /^https?\:\/\/.*.google\..*\/search.*$/ | |
// @grant GM_log | |
// ==/UserScript== |
This file contains 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
#!/bin/bash | |
# remove exited containers: | |
docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
# remove unused images: | |
docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
# remove unused volumes (needs to be ran as root): | |
find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <( |
This file contains 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
// ==UserScript== | |
// @name Youtube Fucookies | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Fuck off Youtube attempts to get your cookies. Press "Y" for going to /embed page and just watch the damn thing. | |
// @author Igor Pellegrini | |
// @include /^https?\:\/\/.*youtube\..*\/.*\?.*v=[^&]+.*$/ | |
// @grant GM_log | |
// ==/UserScript== |
This file contains 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
RUN apt update | |
RUN apt upgrade -y | |
RUN apt install -y apt-utils | |
RUN a2enmod rewrite | |
RUN apt install -y libmcrypt-dev | |
RUN docker-php-ext-install mcrypt | |
RUN apt install -y libicu-dev | |
RUN docker-php-ext-install -j$(nproc) intl | |
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev | |
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ |
http://martinfowler.com/books/refactoring.html
Five or six years ago I was working on an essay about refactoring CSS. I didn't do that, but I did find these notes while working on something new. Hope they're useful! —Dean
p7 "When you find you have to add a feature to a program, and the program's code is not structured in a convenient way to add the feature, first refactor the program to make it easy to add the feature, then add the feature."
p7
OlderNewer