Skip to content

Instantly share code, notes, and snippets.

View arthuralmeidap's full-sized avatar
🏠
Working from home

Arthur Almeida arthuralmeidap

🏠
Working from home
View GitHub Profile
@arthuralmeidap
arthuralmeidap / laravel-supervisor.md
Created June 15, 2021 15:18 — forked from vrajroham/laravel-supervisor.md
Installing Supervisor on AWS Elastic Beanstalk manually.

Installing Supervisor on AWS Elastic Beanstalk manually.

This gist may help you to install supervisor Manually on AWS Beanstalk host. I was enable to install and configure referring supervisor docs. Here are the steps by which I was able to use supervisor on my project.

Note: I have performed this steps on Laravel project and my instance was Debian powered. You can change according to your requirement.


  • Check python with easy_install is installed
  • Install supervisor > $ easy_install supervisor
  • Create directory for supervisor workers > mkdir /etc/supervisor/conf.d/
@arthuralmeidap
arthuralmeidap / Readme.md
Created June 15, 2021 15:18 — forked from StefanieD/Readme.md
Install and use Supervisord with AWS Elastic Beanstalk, Symfony 2 and RabbitMq Bundle
  • Place the supervisord.conf under .ebextensions/supervisor/

  • Place the supervisor.config under .ebextensions/

  • Place the data_import_consumer.conf under .ebextensions/supervisor/

//Types of charts supported
const barChartStrategy = (data) => { // normalize the data to be used by bar charts }
const lineChartStrategy = (data) => { // normalize the data to be used by line charts }
// The factory has the responsability to be a central place to create the specific strategy
//based on the selected chart by the user
const chartStrategyFactory (type) => {
const strategies = { 'bar': barChartStrategy, 'line': lineChartStrategy }
return strategies[type]
}
@arthuralmeidap
arthuralmeidap / new_version.php
Created March 7, 2017 22:51
CODE NEW VERSION
<?php
class Criteria {
/**
*
* @return Criteria
*/
public static function createFromArray($filters){};
}
@arthuralmeidap
arthuralmeidap / old_version.php
Created March 7, 2017 22:45
CODE OLD VERSION
<?php
class VehicleController
{
private $currentColumn = 0;
public function exportAction()
{
Verifying that +arthuralmeidap is my blockchain ID. https://onename.com/arthuralmeidap
@arthuralmeidap
arthuralmeidap / phpdf-ini.sections.patch
Created December 13, 2014 15:59
Translating the ini.sections.xml file [PHPDF <PHP-BRASILIA@yahoogroups.com>]
Index: ini.sections.xml
===================================================================
--- ini.sections.xml (revision 335261)
+++ ini.sections.xml (working copy)
@@ -1,25 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision$ -->
+<!-- EN-Revision: 323642 Maintainer: none Status: ready --><!-- CREDITS: marcelomx, arthuralmeidap, anisio.neto -->
<section xml:id="ini.sections" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">

#BrazilJS 2014

Talks: Slides & Links

Day Talk Speaker Links
1 Why ServiceWorker may be the next big thing Renato Mangini Interview · Slides
1 Frontend at Scale - The Tumblr Story Chris Miller Interview · Slides
1 Intro to GFX: Raw WebGL Nick Desaulniers Interview · Slides
@arthuralmeidap
arthuralmeidap / IndexController
Created November 21, 2011 13:13
IndexController
<?php
namespace Condominio\SystemBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Condominio\SystemBundle\Domain\Entity\User;
class IndexController extends Controller
{
public function indexAction( $name ) {
@arthuralmeidap
arthuralmeidap / User.php
Created November 21, 2011 12:46
User model
<?php
namespace Condominio\SystemBundle\Domain\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="tb_user")
*/
class User
{