This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| #!/bin/bash | |
| currentDir=${PWD##*/} | |
| repoDir=$(basename $(dirname $(dirname $(readlink -f .)))) | |
| APP_CONSOLE="bin/console" | |
| CONFIG_DIR="config" | |
| CACHE_DIR="var/cache" | |
| APP_NAME="ORO" | |
| ENV=$1 |
| # This is just a cheat sheet: | |
| # On production | |
| sudo -u postgres pg_dump database | gzip -9 > database.sql.gz | |
| # On local | |
| scp -C production:~/database.sql.gz | |
| dropdb database && createdb database | |
| gunzip < database.sql.gz | psql database |
| <?php | |
| /** | |
| * http://stackoverflow.com/questions/11305797/remove-zero-width-space-characters-from-a-javascript-string | |
| * U+200B zero width space | |
| * U+200C zero width non-joiner Unicode code point | |
| * U+200D zero width joiner Unicode code point | |
| * U+FEFF zero width no-break space Unicode code point | |
| */ | |
| #!/bin/bash | |
| # Install dependencies | |
| apt-get install libsqlite3-dev ruby1.9.1-dev | |
| # Install the gem | |
| gem install mailcatcher | |
| # Make it start on boot | |
| echo "@reboot $(which mailcatcher) --ip=0.0.0.0" >> /etc/crontab | |
| update-rc.d cron defaults |
| --- | |
| - hosts: all | |
| sudo: no | |
| tasks: | |
| - shell: echo "Client= [$SSH_CLIENT] Sock= [$SSH_AUTH_SOCK]" | |
| register: myecho | |
| - debug: msg="{{myecho.stdout}}" | |
| - shell: ssh-add -l | |
| register: myecho | |
| - debug: msg="{{myecho.stdout}}" |
| #!/bin/bash | |
| PID_FILE=/var/run/mailcatcher.pid | |
| NAME=mailcatcher | |
| PROG="/usr/bin/env mailcatcher" | |
| USER=mailcatcher | |
| GROUP=mailcatcher | |
| start() { | |
| echo -n "Starting MailCatcher" |
| --- | |
| # This has been tested with ansible 1.3 with these commands: | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
| # NB: The type of the variable is crucial! | |
| - name: Ansible Conditionals Examples | |
| hosts: $hosts | |
| vars_files: |