This file contains hidden or 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 | |
| if [ "$1" == "" ]; then | |
| echo "Usage: switch_php.sh <target_version>" | |
| echo "Versions available: 5.6 7.0 7.1 7.2" | |
| exit 1 | |
| fi | |
| case "$1" in | |
| "5.6") |
This file contains hidden or 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 | |
| if [ "$1" == "" ]; then | |
| echo "Error: search key required." | |
| echo "Use: search.sh <key> [<vendors>]" | |
| echo "- key: any string to be found" | |
| echo "- vendors: v" | |
| echo "Example: ./search.sh httphelper v" | |
| exit 1 | |
| fi |
This file contains hidden or 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 | |
| ERROR_MESSAGE="Error - usage: pin <number> <on|off>" | |
| # some checks... | |
| if [ "$1" == "" ]; then | |
| echo "$ERROR_MESSAGE" | |
| exit 1 | |
| fi |
This file contains hidden or 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 | |
| use Symfony\Component\DependencyInjection\Container; | |
| class Entity { | |
| const IMAGES_FOLDER = '/uploads/images/contents'; | |
| protected $image; // mapped prop | |
This file contains hidden or 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 | |
| if [ -f "./bin/console" ]; then | |
| php bin/console $1 $2 $3 $4 $5 $6 $7 $8 $9 | |
| else | |
| if [ -f "./app/console" ]; then | |
| php app/console $1 $2 $3 $4 $5 $6 $7 $8 $9 | |
| else | |
| echo "Symfony console script not found." | |
| exit 1 |
This file contains hidden or 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
| #alert-container { | |
| position: absolute; | |
| right: 10px; | |
| top: 10px; | |
| z-index: 2000; | |
| } | |
| #alert-container .alert-message { | |
| display: block; |
This file contains hidden or 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
| <ul {% if level != 0 %} class="collapse" id="collapsable-{{ unique }}-{{ parent_index }}-{{ level }}"{% else %}{% endif %}> | |
| {% if value is empty %} | |
| <li>(empty)</li> | |
| {% else %} | |
| {% for index, val in value %} | |
| {% if val is iterable %} | |
| <li> | |
| <a role="button" aria-expanded="false" aria-controls="collapsable-{{ unique }}-{{ parent_index ~ '-' ~ index }}-{{ level + 1 }}" data-toggle="collapse" href="#collapsable-{{ unique }}-{{ parent_index ~ '-' ~ index }}-{{ level + 1 }}"> | |
| [{{ index }}] => | |
| </a> |
This file contains hidden or 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 | |
| echo "Uglify all css files in web/css folder" | |
| cd web/css | |
| pwd | |
| for i in $( find . -type f -name '*\.css' ); do | |
| echo "uglifycss $i" | |
| uglifycss $i > temp.css |
This file contains hidden or 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 | |
| if [ "$1" == "" ]; then | |
| echo "Error: database required: use create-database <db_name> <username> <password>" | |
| exit 1 | |
| fi | |
| if [ "$2" == "" ]; then |
This file contains hidden or 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 | |
| # configure script parameters here | |
| USERNAME=username # username for ssh/scp connection | |
| SERVER=123.123.123.123 # server ip for ssh/scp connection | |
| PORT=22 # ssh port | |
| ADDITIONAL_SSH_PARAMS="-i mykeys.pem" # additional ssh parameters to append to ssh and scp commands | |
| REMOTE_DATABASE_NAME=exampledb # name of the database on the remote server (used with dump script and as sql remote filename) |