Skip to content

Instantly share code, notes, and snippets.

View eminetto's full-sized avatar
:octocat:
always learning

Elton Minetto eminetto

:octocat:
always learning
View GitHub Profile
<?php
include 'vendor/autoload.php';
use Zend\Crypt\Password\Bcrypt;
$password = 'MyDarkSecret';
$hashFromGo = '$2a$10$XCE/s3FRwi.Zg9uswHZdueNmRtYKg8iFOTfWbnhWC71Bm5ur2ce0q';
$bcrypt = new Bcrypt();
eminetto@Eltons-MacBook-Air ~/Documents/Projects/go/authenticate: time ./authenticate ; time php ../../mcrypt/index.php
$2a$10$sN5IsJjlXQXxMQSxvJMy2OlREcaxddMmJwASH3Zl1Y64I3JGmUUvC
<nil>
<nil>
real 0m0.305s
user 0m0.300s
sys 0m0.005s
$2y$10$XTUzbjZhF9vKCypOcvQ6tek7Uqp9p4RRHIoAyRNVEsM5v0xLCt/au
1
A Coderockr está procurando um novo membro para sua equipe
Se você é programador Android com experiência mande um e-mail com seu currículo para jobs@coderockr.com
Além da experiência em desenvolvimento Android os seguintes requisitos também são importantes:
- Conhecimento em ferramentas de controle de versão como SVN e Git
- Inglês técnico, para leitura
- Conhecimento em desenvolvimento de interfaces voltadas a Android
- Conhecimento em ferramentas gráficas como Fireworks e Photoshop
- Gostar de rock n’ roll!
$date_start = \DateTime::createFromFormat('d/m/Y', $data['date_start']);
$date_end = \DateTime::createFromFormat('d/m/Y', $data['date_end']);
$qb = $em->createQueryBuilder();
$params = $paramsProfiles = array('date_start' => $date_start, 'date_end' => $date_end);
$qb->select('count(p.id) as v, c.name, p.percent')
->from('CodeSquad\Model\Progress', 'p')
->innerJoin('p.course', 'c')
->where('p.created > :date_start and p.created < :date_end')
<VirtualHost *:80>
DocumentRoot "/var/www/html/ufun"
ServerName ufun.coderockr.com
SetEnv APPLICATION_ENV "development"
<Directory "/var/www/html/ufun">
Options Indexes Multiviews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<?php
return array(
'service_manager' => array(
'factories' => array(
'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory',
),
),
'db' => array(
'driver' => 'Pdo',
'dsn' => 'mysql:dbname=iniciandozf2;host=localhost',
<?php
namespace Application\Model;
class Post
{
public $id;
public $title;
public $description;
public $post_date;
<?php
namespace Application\Model;
use Zend\Db\TableGateway\TableGateway;
class PostTableGateway
{
protected $tableGateway;
public function __construct(TableGateway $tableGateway)
'service_manager' => array(
'abstract_factories' => array(
'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
'Zend\Log\LoggerAbstractServiceFactory',
),
'aliases' => array(
'translator' => 'MvcTranslator',
),
'factories' => array(
'Application\Model\PostTableGateway' => function($sm) {
<?php
namespace Application\Controller;
use Zend\View\Model\ViewModel;
use Zend\Mvc\Controller\AbstractActionController;
/**
* Controlador que gerencia os posts
*
* @category Application