TLDR: Use for...of instead of forEach() in asynchronous code.
For legacy browsers, use for(...;...;...) or [].reduce()
To execute the promises in parallel, use Promise.all([].map(...))
/*
Made by [egyJs.com](https://www.instagram.com/egyjs/);
*/
install it on your localhost and try it :
| <textarea><p style="text-align: center; font-size: 15px;"><img title="TinyMCE Logo" src="//www.tinymce.com/images/glyph-tinymce@2x.png" alt="TinyMCE Logo" width="110" height="97" /> | |
| </p> | |
| <h1 style="text-align: center;">Welcome to the TinyMCE Cloud demo!</h1> | |
| <h5 style="text-align: center;">Note, this includes some "enterprise/premium" features.<br>Visit the <a href="https://www.tinymce.com/pricing/#demo-enterprise">pricing page</a> to learn more about our premium plugins.</h5> | |
| <p>Please try out the features provided in this full featured example.</p> | |
| <h2>Got questions or need help?</h2> | |
| <ul> | |
| <li>Our <a href="//www.tinymce.com/docs/">documentation</a> is a great resource for learning how to configure TinyMCE.</li> | |
| <li>Have a specific question? Visit the <a href="https://community.tinymce.com/forum/">Community Forum</a>.</li> |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
as found on StackOverflow
And this command to restart my php-fpm:
brew services restart php56
| <?php | |
| // Used in https://github.com/im4aLL/roolith-event | |
| // https://packagist.org/packages/roolith/event | |
| class Event { | |
| private static $events = []; | |
| public static function listen($name, $callback) { | |
| self::$events[$name][] = $callback; | |
| } |
Sometimes you need to keep two upstreams in sync with eachother. For example, you might need to both push to your testing environment and your GitHub repo at the same time. In order to do this simultaneously in one git command, here's a little trick to add multiple push URLs to a single remote.
Once you have a remote set up for one of your upstreams, run these commands with:
git remote set-url --add --push [remote] [original repo URL]
git remote set-url --add --push [remote] [second repo URL]
Once set up, git remote -v should show two (push) URLs and one (fetch) URL. Something like this:
Removing the last commit
To remove the last commit from git, you can simply run git reset --hard HEAD^ If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.
If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^ which will evict the commits from the branch and from the index, but leave the working tree around.
If you want to save the commits on a new branch name, then run git branch newbranchname before doing the git reset.
This gist assumes:
www-data (may be apache on other systems)