Using Homebrew install mailhog and enable the service as instructed in the installation.
Open in any browser http://localhost:8025
Edit file /etc/postfix/main.cf
sudo vim /etc/postfix/main.cf
| #!/bin/bash | |
| # thanks http://www.jenssegers.be/blog/46/deploying-websites-with-git-and-composer- | |
| # replace folder | |
| cd "`dirname $0`/../../application/config" | |
| # Check if a composer.json file is present | |
| if [ -f composer.json ]; then |
| # Created by https://www.gitignore.io/api/wordpress | |
| ### WordPress ### | |
| *.log | |
| wp-config.php | |
| wp-content/advanced-cache.php | |
| wp-content/backup-db/ | |
| wp-content/backups/ | |
| wp-content/blogs.dir/ | |
| wp-content/cache/ |
Using Homebrew install mailhog and enable the service as instructed in the installation.
Open in any browser http://localhost:8025
Edit file /etc/postfix/main.cf
sudo vim /etc/postfix/main.cf
| <?php | |
| if (!file_exists(__DIR__ . '/' . $_SERVER['REQUEST_URI'])) { | |
| $_GET['_url'] = $_SERVER['REQUEST_URI']; | |
| } | |
| return false; |
| lucasta $ composer require -vvv friendsofcake/crud-view | |
| You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug | |
| Reading ./composer.json | |
| Loading config file /Volumes/Data/Users/m/.composer/config.json | |
| Loading config file /Volumes/Data/Users/m/.composer/auth.json | |
| Loading config file ./composer.json | |
| Checking CA file /private/var/folders/6x/ff39wr016ys25ffbp8xwzd9c0000gn/T/composer-cacert-39eaf16e26c08cc90d728865f1c60406ee5d864d5963f72ede2a1cbb127f95ca.pem | |
| Executing command (/Volumes/Data/Users/m/Documents/Workspace/projects/www/lucasta): git branch --no-color --no-abbrev -v | |
| Failed to initialize global composer: Composer could not find the config file: /Volumes/Data/Users/m/.composer/composer.json | |
| To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section |
Found this on Yii wiki: Yii 2.0: PHP built-in server integration
Really cool and my default when working with Yii.
Place the ServeController.php file in "commands/" folder.
From the root of your project run "./yii serve" on Linux/BSD/OSX or "yii.bat serve" on Windows.
Open your browser to "http://localhost:8080" and work.
| /* This is a snippet found on stackoverflow: http://stackoverflow.com/questions/3714628/jquery-get-the-location-of-an-element-relative-to-window | |
| */ | |
| function log(txt) { | |
| $("#log").html("location : <b>" + txt + "</b> px") | |
| } | |
| $(function() { | |
| var eTop = $('#element').offset().top; //get the offset top of the element | |
| log(eTop - $(window).scrollTop()); //position of the ele w.r.t window |
| #!/bin/bash | |
| # replace what is in [[ ]] with necessary variables | |
| # Database credentials | |
| user="[[username]]" | |
| password="[[password]]" | |
| host="[[host]]" | |
| db_name="[[database_name]]" | |
| # Other options | |
| backup_path="[[path_to_backup_folder]]" |
| <?php // Use this when you use normal web cron and scheduled posts don't get published | |
| define( 'ALTERNATE_WP_CRON', true ); |