<author>/<type>/<ticket>/<title>
revett/feature/24101/skeleton-service-for-email-sender
| <?php | |
| define('TYPEHINT_PCRE','/^Argument (\d)+ passed to (?:(\w+)::)?(\w+)\(\) must be an instance of (\w+), (\w+) given/'); | |
| class Typehint | |
| { | |
| private static $Typehints = array( | |
| 'boolean' => 'is_bool', | |
| 'integer' => 'is_int', |
| FROM debian:stable-slim | |
| WORKDIR ~/sv | |
| COPY . . | |
| # set up the database | |
| RUN apt update && apt install mariadb-server autoconf automake gettext make imagemagick php php-mysqli -y | |
| # run this manually or in the ./run-local-dev.sh script, it doesn't work here for some reason | |
| # RUN service mysql restart | |
| # RUN mysql -uroot -e "CREATE DATABASE sv_demo; CREATE USER 'sv'@'localhost' IDENTIFIED BY 'sv'; GRANT ALL PRIVILEGES ON sv_demo.* TO 'sv'@'localhost';" | |
| # RUN gzip -d < savane_demo-2022-05.sql.gz | mysql --user=sv --password=sv sv_demo |
| #!/usr/bin/env sh | |
| # Adapted from previous work: | |
| # - https://gist.github.com/neowutran/e93ce542ba1e94a5ecbf1a38eef85485 | |
| # Adapted previous work to support QubesOS v4.2 | |
| # - https://gist.github.com/fepitre/941d7161ae1150d90e15f778027e3248 | |
| # - https://gist.github.com/daktak/f887352d564b54f9e529404cc0eb60d5 | |
| # - https://gist.github.com/jpouellet/d8cd0eb8589a5b9bf0c53a28fc530369 | |
| # - https://gist.github.com/Joeviocoe/6c4dc0c283f6d6c5b1a3f5af8793292b |
It's a common confusion about terminal colours... Actually we have this:
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Updated: 2010/12/05 | |
| // | |
| // the regular expression composed & commented | |
| // could be easily tweaked for RFC compliance, | |
| // it was expressly modified to fit & satisfy | |
| // these test for an URL shortener: |
| <?php | |
| /* | |
| * Note: You'll need PHP5.3 to run this script! | |
| */ | |
| /* | |
| * Patterns originate from http://mathiasbynens.be/demo/url-regex | |
| * | |
| * Note: None of the patterns had the S-modifier. I added it to speed up the tests. |