This file contains 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
curl -u admin -p -XPUT 'https://your_elasticsearch_url:9243/_watcher/watch/cluster_size_watch' -d '{ | |
"trigger" : { | |
"schedule" : { "interval" : "60s" } | |
}, | |
"input" : { | |
"http" : { | |
"request" : { | |
"host" : "your_elasticsearch_url", | |
"port" : 9243, | |
"scheme" : "https", |
This file contains 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 | |
//.. | |
$foo = "foofoo"; | |
$bar = "barbar"; | |
$conn = new PDO('mysql:host=yourserverip;dbname=yourdatabasename', 'username', 'password'); | |
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
This file contains 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 | |
public function myPostControllerFunction($someObject) { | |
$dispatcher = $this->get('event_dispatcher'); | |
$logger = $this->get('logger'); | |
$dispatcher->addListener('kernel.terminate', function ($event) use ($logger, $someObject) { | |
$logger->warning('This log entry was generated after Kernel Terminate and was passed an object of class: '.get_class($someObject)); | |
}); | |
} |
This file contains 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 Symfony\Component\Form\FormEvent; | |
use Symfony\Component\Form\FormEvents; | |
use Symfony\Component\Form\AbstractType; | |
class MyFormType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) |
This file contains 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
// refile upload progress | |
var uploadsSuccessful = 0; | |
var uploadsFailed = 0; | |
var uploadsCompleted = 0; | |
var uploadsTotal = 0; | |
var progressBarParent = null; | |
$(document).on("upload:start", "form", function(e) { | |
$(this).find("input[type=submit]").attr("disabled", true); |
Usage:
#fill_watermark_text(img, width, height, text, gravity = "Center")
attachment_url(object, :attachment, :fill_watermark_text, 800, 600, "My Watermark")
This file contains 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
11:31 AM <LesaraRose> Sorry. I have a lot of questions lol | |
11:33 AM <TheWill> hardest: inspiring volunteers. work: being everybody's surrogate parent because they were ~20yo and antisocial and didn't know how to avoid generating a storm of drama everywhere they go | |
11:34 AM <TheWill> the idea of "everybody contributes towards the common good" is great until you're dealing with people who can't resolve the "who washes the dishes" conflict with their roommate | |
11:35 AM <TheWill> in other words a balance of demographics is vastly superior even if less comfortable | |
11:36 AM <TheWill> having a paid community manager is in my opinion the most effective way to reduce drama | |
11:36 AM <TheWill> and burnout | |
11:40 AM <myself> Hardest: Getting our external image to reflect the diversity of stuff actually happening in the space. Our technical people get more attention than our artistic people, so it takes a lot of work to bring in more artistic people. Yet, when we take both technical and artistic projects to show off at an e |
This file contains 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 | |
namespace Acme\YourBundle\Listener; | |
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Symfony\Component\Routing\Exception\RouteNotFoundException; | |
use Symfony\Bundle\TwigBundle\TwigEngine; |
This file contains 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
Show hidden characters
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", | |
"*.dds", |