Run the tests (code below): testing-variable-existence.php
=== null | is_null | isset | empty | if/else | ternary | count > 0 | |
---|---|---|---|---|---|---|---|
$a; | true | true | true | ||||
null | true | true | true |
# Usage: | |
# $ mamp | |
# $ mamp (apache|vhosts|hosts|php|mysql|a|v|h|p|m) | |
# $ mamp (error|e) | |
# $ mamp (error|e) (clear|apache|php|mysql|a|p|m) | |
# e.g. open php.ini: $ mamp php | |
# $ mamp p | |
# e.g. open apache error log: $ mamp error apache | |
# $ mamp e a | |
# Uses $EDITOR by default. |
Run the tests (code below): testing-variable-existence.php
=== null | is_null | isset | empty | if/else | ternary | count > 0 | |
---|---|---|---|---|---|---|---|
$a; | true | true | true | ||||
null | true | true | true |
#!/usr/bin/env bash | |
DOMAIN=$1 | |
if [ -z "$DOMAIN" ]; then | |
echo -n 'Enter root domain (no www): ' | |
read input_d | |
DOMAIN=$input_d | |
fi |
pwd | tr -d '\n' | pbcopy |
#!/usr/bin/env bash | |
# Works partially with Symofny 2.5 | |
# Works fully with Symfony 2.3 — 2.4 | |
# Tested against Symfony: 2.5.0, 2.4.1, 2.3.9 | |
# Usage: | |
# symfony2_hello_world.sh <optional: project folder> <optional: symfony version> <optional: domain name> | |
# Examples: | |
# symfony2_hello_world.sh |
#!/usr/bin/env bash | |
function defaultinput() | |
{ | |
local LABEL=$1 | |
local DEFAULT=$2 | |
local __return=$3 | |
echo -n "$LABEL [$DEFAULT] " | |
read input_a | |
if [[ -z "$input_a" ]]; then |
##### first attempt | |
# one-liner | |
echo $PATH | sed -e "s~:~\\`echo -e '\n\r'`~g" | |
# bash function | |
sep2ln() | |
{ | |
local INPUT=$1 | |
local SEPARATOR=$2 |
# add HTTP Strict Transport Security (HSTS) header to all *non-php* responses | |
# - mod_fastcgi apparently ignores mod_headers? | |
# - see: https://www.owasp.org/index.php/HTTP_Strict_Transport_Security | |
Header set Strict-Transport-Security "max-age=7776000" |
# file: app/config/config.yml | |
imports: | |
- { resource: parameters.yml } | |
- { resource: parameters_pagoda.php } # import after parameters.yml to override it's values | |
- { resource: security.yml } |
I hereby claim:
To claim this, I am signing this object: