create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?php | |
foreach (Cache::getMemory() as $cacheKey => $cacheValue) | |
{ | |
if (strpos($cacheKey, 'mypackage') !== false) | |
{ | |
Cache::forget($cacheKey); | |
} | |
} |
Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
expire & throw a strange error. | |
Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
<?php | |
namespace Deployer; | |
require 'recipe/laravel.php'; | |
require 'vendor/deployer/recipes/local.php'; | |
require 'vendor/deployer/recipes/rsync.php'; | |
require 'vendor/deployer/recipes/npm.php'; | |
// Configuration | |
set('ssh_type', 'native'); |
git rebase -i HEAD~n (Where n is the number of commits, useful for squashing several meaningless commits into one) | |
git push -f | |
Useful links: | |
https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request |
# custom WebStorm VM options, this configuration also works well for other IDEs like phpstorm, pycharm..etc. | |
-Xms1024m | |
-Xmx2048m | |
-XX:ReservedCodeCacheSize=240m | |
-XX:+UseConcMarkSweepGC | |
-XX:SoftRefLRUPolicyMSPerMB=50 | |
-ea | |
-Dsun.io.useCanonCaches=false | |
-Djava.net.preferIPv4Stack=true |
I hereby claim:
To claim this, I am signing this object:
The 0.13.0
improvements to React Components are often framed as "es6 classes" but being able to use the new class syntax isn't really the big change. The main thing of note in 0.13
is that React Components are no longer special objects that need to be created using a specific method (createClass()
). One of the benefits of this change is that you can use the es6 class syntax, but also tons of other patterns work as well!
Below are a few examples creating React components that all work as expected using a bunch of JS object creation patterns (https://github.com/getify/You-Dont-Know-JS/blob/master/this%20&%20object%20prototypes/ch4.md#mixins). All of the examples are of stateful components, and so need to delegate to React.Component
for setState()
, but if you have stateless components each patterns tends to get even simpler. The one major caveat with react components is that you need to assign props
and context
to the component instance otherwise the component will be static. The reason is
// Get record by subobject | |
db.protocol.find({"study.official_title": "TEST"}) | |
db.protocol.find({"study.official_title": "TEST"},{"events": 1}) |