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
| db.posts.aggregate([ | |
| { | |
| $unwind: "$comments" | |
| }, | |
| { | |
| $group: { | |
| _id: "$comments.author", | |
| count: {$sum: 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
| db.posts.createIndex({date:-1}) | |
| db.posts.createIndex({tags:1, date:-1}) | |
| db.posts.createIndex({permalink: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
| Instalar composer de manera global | |
| ---------------------------------- | |
| cd ~ | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| php composer-setup.php | |
| php -r "unlink('composer-setup.php');" | |
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
| <VirtualHost *:80> | |
| ServerName blog.app | |
| ServerAdmin webmaster@localhost | |
| DocumentRoot /var/www/html/blog/public | |
| ErrorLog ${APACHE_LOG_DIR}/error.log | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| SetEnv APPLICATION_ENV "development" |