Skip to content

Instantly share code, notes, and snippets.

@juizmill
juizmill / ManagerRegistry.php
Last active March 16, 2016 15:32 — forked from umpirsky/ManagerRegistry.php
Use the entity form type in Silex
<?php
namespace Umpirsky\Doctrine\Common\Persistance;
use Doctrine\Common\Persistence\AbstractManagerRegistry;
use Silex\Application;
/**
* References Doctrine connections and entity/document managers.
*
@juizmill
juizmill / Install-Docker-on-Linux-Mint.sh
Last active November 26, 2015 02:24 — forked from sirkkalap/Install-Docker-on-Linux-Mint.sh
Install Docker on Linux Mint
##########################################
# To run:
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x
##########################################
# Check that HTTPS transport is available to APT
if [ ! -e /usr/lib/apt/methods/https ]; then
sudo apt-get update
sudo apt-get install -y apt-transport-https
fi
@juizmill
juizmill / Cron Jobs MAUTIC
Last active September 26, 2017 18:19
Lista de Cron Jobs para configurar.
# Não esqueça de alterar o caminho para seu mautic e seu PHP.
# O primeiro atualiza as listas de leads
# SE VOCÊ USA SERVIDOR DEDICADO OU VPS
php /path/to/mautic/app/console mautic:leadlists:update --env=prod
php /path/to/mautic/app/console mautic:campaigns:update -f --env=prod
php /path/to/mautic/app/console mautic:campaigns:trigger -f --env=prod
php /path/to/mautic/app/console mautic:email:process --env=prod
@juizmill
juizmill / gist:dfaae26f08150f9965ee
Created October 5, 2015 11:58
Configurações para o Sublime como IDE para PHP / JS
Finalmente, agora eu tenho tudo quase perfeito com o Sublime, só me falta mesmo é um Outline para fechar de vez.
Segue relação dos plugins que estou utilizando com o Sublime, bem como minhas configurações:
O primeiro package a instalar é o Package Control. A partir dele é possível intalar todos os outros pacotes executando Cmd+Shift+P (ou Ctrl para quem usa Linux/Windows), e buscando por "Package Control:Install Package".
Para instalar o Package Control, execute as instruções contidas nesta página:
https://packagecontrol.io/installation
Agora, chame o comando de instalação de pacotes e instale os seguintes pacotes.
<?php
// Script para demonstrar o loop infinito em PHP sem travar
while (true) {
puts "Ola, eu estou em loop!<br />"; // troque essa linha pelo seu loop real
flush();
sleep(1);
}
@juizmill
juizmill / .vimrc
Last active September 2, 2015 03:50
my .vimrc
set nocompatible
"filetype off
filetype plugin indent on
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
call vundle#end()
filetype plugin indent on
{
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.sublime-project",
"*.sublime-workspace",
"*.pyc",
"*.pyo",
@juizmill
juizmill / Interview.json
Last active August 29, 2015 14:22
Interview
{
"_id" : ObjectId("557089a3e4ad05ad103e482b"),
"jobId": "1",
"userId": "1",
"companyId": "1",
"date": ISODate("1960-07-20T01:00:00.000Z"),
"sentAt": ISODate("1960-07-20T01:00:00.000Z"),
"confirmed": true,
"reminderSentAt": ISODate("1960-07-20T01:00:00.000Z"),
"reminderSentTwoDaysBeforeAt": ISODate("1960-07-20T01:00:00.000Z"),
@juizmill
juizmill / preferences.json
Created May 22, 2015 18:49
My Preferences for Sublime text
{
"auto_complete": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Dayle Rees Color Schemes/sublime/zacks.tmTheme",
"detect_indentation": false,
"detect_slow_plugins": false,
"draw_indent_guides": true,
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
@juizmill
juizmill / ExemploData.php
Created April 27, 2015 14:29
ExemploData.php
<?php
namespace HitBase\Fixture\Common;
use HitBase\Entity\Exemplo;
/**
* ExemploData
*/
class ExemploData