Help Ukraine by attacking Russian web sites. Good load testing training.
Tools:
Help Ukraine by attacking Russian web sites. Good load testing training.
Tools:
defmodule MyApp.Serializer.Fields do | |
defmacro __using__(fields) do | |
quote do | |
@json_group_fields unquote(fields) | |
def get_fields_for_group(group) do | |
group = MapSet.new(group) | |
Enum.reduce(@json_group_fields, [], fn {f, g}, acc -> | |
g = MapSet.new(g) |
Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.
This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.
The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.
To grab the new archive, simply run:
<?php | |
namespace YourBundle\Provider; | |
use Sonata\MediaBundle\Provider\FileProvider; | |
class ImageProvider extends FileProvider | |
{ | |
} |
// getComponent is a function that returns a promise for a component | |
// It will not be called until the first mount | |
function asyncComponent(getComponent) { | |
return class AsyncComponent extends React.Component { | |
static Component = null; | |
state = { Component: AsyncComponent.Component }; | |
componentWillMount() { | |
if (!this.state.Component) { | |
getComponent().then(Component => { |