Skip to content

Instantly share code, notes, and snippets.

(function() {
'use strict';
angular
.module('app')
/** será <acme-hello-world></acme-hello-world> */
.directive('acmeHelloWorld', acmeHelloWorld);
/** @ngInject */
function acmeHelloWorld() {
var mongoose = require('mongoose');
var ObjectId = require('mongoose').Types.ObjectId;
// um array simples, como 3 objetos
var recipients = [
{ email: "user1@email.com" },
{ email: "user2@email.com" },
{ email: "user3@email.com" }
];
@ianrodrigues
ianrodrigues / estados-cidades.json
Created September 21, 2016 16:52 — forked from letanure/estados-cidades.json
JSON estados cidades
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@ianrodrigues
ianrodrigues / Dockerfile
Last active October 24, 2016 12:12
Dockerfile
FROM ianrodriguesbr/nginx_php-fpm
MAINTAINER Ian Rodrigues <ianrodriguesbr@gmail.com>
RUN apt-get update && apt-get install apt-utils locales -y \
&& sed -i -e 's/# pt_BR.UTF-8 UTF-8/pt_BR.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen \
&& echo "America/Fortaleza" > /etc/timezone \
&& dpkg-reconfigure tzdata \
&& sed -i "s/;date.timezone =/date.timezone = America\/Fortaleza/" /etc/php/7.0/cli/php.ini \
@ianrodrigues
ianrodrigues / .php_cs
Created January 4, 2017 19:17
Laravel 5.3 PHP CS Fixer example.
<?php
use Symfony\CS\Config\Config;
use Symfony\CS\FixerInterface;
use Symfony\CS\Finder\DefaultFinder;
$fixers = [
'blankline_after_open_tag',
'braces',
'double_arrow_multiline_whitespaces',
|- fauno.funceme.br
|
|---- acude
|-------- tabela_1
|-------- tabela_2
|-------- tabela_3
|
|---- tempo
|-------- tabela_1
|-------- tabela_2
<?php
namespace Acude\Volume\Model;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Zend\Stdlib\Hydrator;
/**
* @ORM\Entity
@ianrodrigues
ianrodrigues / file.php
Created March 1, 2017 17:22
CÓDIGO DO MEU ÓDIO
public function tempoAgora()
{
$ufRepo = $this->em->getRepository("Adm\Uf\Model\Uf");
$estacaoRepo = $this->em->getRepository("Pcd\Estacao\Model\Estacao");
$postos = $estacaoRepo->get_estacoes_ne();
$result = [];
foreach ($postos as $posto) {
if ($posto['est_codigo'] == 572) {
{
codigo: "A305",
codigo_municipio: "2304400",
nome: "FORTALEZA",
latitude: "-3.8157",
longitude: "-38.5378",
imagem: "2304400.png",
temperatura: "27.9 °C",
temperatura_min: "23.9 °C",
temperatura_max: "28.7 °C",
<?php
class JobController extends BaseController {
public function index()
{
$search = Input::get('search');
$filter_client = Input::get('client');
$filter_type = Input::get('type');