Skip to content

Instantly share code, notes, and snippets.

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

Daniel Lemes lemesdaniel

🏠
Working from home
View GitHub Profile
Estatística com JavaScript
https://gist.github.com/banksean/300494 : Gerador de números aleatórios Mersenne Twister implentação em javascript
##############################################################################
# INSTALL isolated PHP 5.6 ZTS (Thread-safe) with pthreads on Ubuntu 14.04 ###
##############################################################################
1) Install necessary bison version
wget http://launchpadlibrarian.net/140087283/libbison-dev_2.7.1.dfsg-1_amd64.deb
wget http://launchpadlibrarian.net/140087282/bison_2.7.1.dfsg-1_amd64.deb
dpkg -i libbison-dev_2.7.1.dfsg-1_amd64.deb
dpkg -i bison_2.7.1.dfsg-1_amd64.deb
<?php
return [
'default' => env('BROADCAST_DRIVER', 'fanout'),
'connections' => [
'fanout' => [
'driver' => 'fanout',
@lemesdaniel
lemesdaniel / app.php
Created August 11, 2015 20:31
app.php
LaravelFanout\FanoutBroadcastServiceProvider::class,
@lemesdaniel
lemesdaniel / PublishToFanoutEvent.php
Created August 11, 2015 20:36
PublishToFanoutEvent.php
<?php namespace App\Events;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class PublishToFanoutEvent implements ShouldBroadcast
{
use SerializesModels;
<!DOCTYPE html>
<html>
<head>
<title>Exemplo Laravel e Fanout</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body >
<!DOCTYPE html>
<html>
<head>
<title>Exemplo Laravel e Fanout</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body >
<!DOCTYPE html>
<html>
<head>
<title>Exemplo Laravel e Fanout</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body >
var app = new Vue({
el: '#list',
data: {
posts: [
{
title: 'Como integrar o fanout com laravel'
},
]
}
})
var client = new Faye.Client('http://9b1cf4d8.fanoutcdn.com/bayeux');
client.subscribe('/test', function (item) {
app.posts.push({ title: item.data.message })
});