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
| body { | |
| background-color: #ddd; | |
| } | |
| #entry-list>li { | |
| position: relative; | |
| padding: 30px 20px; | |
| background:#f3f3f3; | |
| margin:10px 0; | |
| font-size:18px; | |
| border:1px solid #ccc; |
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 | |
| /** | |
| * This script attempts to add namespace Processwire to every .php and .module file in the given directory. | |
| * It worked fine for my project but I cannot guarantee for you, so PLEASE take a backup or two before you | |
| * attempt to try it. | |
| * | |
| * To use it put this in your root folder and navigate with your browser to the file like | |
| * example.com/processwire-3-namespace-migrator.php | |
| * Also you should disable the compiler by setting $config->templateCompile=false; in your /site/config.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
| <\?(?!(php|=|xml))(\s|\t|\n) |
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 | |
| /** | |
| * Components are tightly connected (or appears so) to the controllers | |
| * and as the application grows bigger, some of the work is done other places | |
| * like event listener classes, mailers, shell commands, custom project classes etc. | |
| * When that happens this can lead to code duplication from your components to those places. | |
| * | |
| * On a CakePHP project we are working on we starting using a structure called Features (idea taken | |
| * from a Laravel community), where we have a "Feature Runner" trait, and a feature class structure which | |
| * only includes a constructor and handle public methods and run as in example. By adding use FeatureRunner to any class |
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 Migrations\AbstractMigration; | |
| class ArticlesI18n extends AbstractMigration | |
| { | |
| /** | |
| * Change Method. | |
| * | |
| * More information on this method is available here: | |
| * http://docs.phinx.org/en/latest/migrations.html#the-change-method |
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
| #I keep forgetting this! | |
| zcat myfile.sql.gz | mysql -u root -ppassword mydbname |
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
| service nginx stop;sudo -H /opt/letsencrypt/letsencrypt-auto renew;service nginx start |
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
| //https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen | |
| //Put this in console and watch :) | |
| clear(); | |
| document.querySelector('#u_0_t ._2qo2 ._2qo6').click(); | |
| setTimeout(()=>{ | |
| var seeMoreInterval = setInterval(()=>{ | |
| if(document.querySelector('._45yr')) { | |
| document.querySelector('._45yr').click() | |
| } else { |
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
| sudo runuser -l root -c 'pm2 restart myapp' |
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
| sudo npm cache clean -f | |
| sudo npm install -g n | |
| sudo n stable |