Skip to content

Instantly share code, notes, and snippets.

View liorkesos's full-sized avatar
😎
chillin

Lior Kesos liorkesos

😎
chillin
View GitHub Profile
server {
listen 80;
server_name anu.dockerz.linnovate.net;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
root /usr/share/nginx/html;
<div style="width:100%; text-align:left;" ><iframe src="//eventbrite.com/tickets-external?eid=27090343948&ref=etckt" frameborder="0" height="214" width="100%" vspace="0" hspace="0" marginheight="5" marginwidth="5" scrolling="auto" allowtransparency="true"></iframe><div style="font-family:Helvetica, Arial; font-size:10px; padding:5px 0 5px; margin:2px; width:100%; text-align:left;" ><a class="powered-by-eb" style="color: #dddddd; text-decoration: none;" target="_blank" href="http://www.eventbrite.com/l/registration-online/">Powered by Eventbrite</a></div></div>
@liorkesos
liorkesos / consumer.js
Created July 3, 2016 11:54
Using a queue in node-busmq consumer
var Bus = require('busmq');
var bus = Bus.create({redis: ['redis://127.0.0.1:6379']});
bus.on('online', function() {
var q = bus.queue('foo');
q.on('attached', function() {
console.log('attached to queue. messages will soon start flowing in...');
});
q.on('message', function(message, id) {
if (message === 'my name if foo') {
q.detach();
@liorkesos
liorkesos / busmq-producer.js
Created July 3, 2016 11:50
Node-busmq producer
var Bus = require('busmq');
var bus = Bus.create({redis: ['redis://127.0.0.1:6379']});
bus.on('online', function() {
var q = bus.queue('foo');
q.on('attached', function() {
console.log('attached to queue');
});
q.attach();
q.push({hello: 'world'});
q.push('my name if foo');
var Bus = require('busmq');
var bus = Bus.create({redis: ['redis://192.168.0.1:6379', 'redis://[email protected]:6379']);
// or specify the node-redis driver explicitly
// var bus = Bus.create({driver: 'node-redis', redis: ['redis://192.168.0.1:6379', 'redis://[email protected]:6379']);
// or specify the ioredis driver explicitly
// var bus = Bus.create({driver: 'ioredis', redis: ['redis://192.168.0.1:6379', 'redis://[email protected]:6379']);
// or specify the ioredis driver and cluster
// var bus = Bus.create({driver: 'ioredis', layout: 'cluster', redis: ['redis://192.168.0.1:6379', 'redis://[email protected]:6379']);
// or specify the ioredis driver and sentinel
# This file describes an application. You can have multiple applications
# in the same project.
#
# The name of this app. Must be unique within a project.
name: myphpproject
# The type of the application to build.
type: php:5.6
build:
flavor: symfony
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml" itemscope="itemscope" itemtype="http://schema.org/Product">
<!DOCTYPE html>
<head>
<base href="/">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="fragment" content="!">
<?php
$arr = array(
'properties' => array(
array(
'property' => 'email',
'value' => '[email protected]'
),
array(
'property' => 'firstname',
'value' => 'hubspot'
public function publishEvent($data) {
$opts = array(
'http' => array(
'method' => 'POST',
'header' => "Content-type: application/json",
'content' => json_encode($data)
)
);
$context = stream_context_create($opts);
$response = file_get_contents(self::INDEX_ENDPOINT_01.'/'.$data['index'].'/'.$data['eType'], false, $context);