Skip to content

Instantly share code, notes, and snippets.

View IgorDePaula's full-sized avatar
😆

Igor C. de Paula IgorDePaula

😆
View GitHub Profile
var kue = require('kue')
, jobs = kue.createQueue();
var spawn = require('child_process').spawn;
kue.app.listen(3000); //painel de acompanhamento do kue
var job = jobs.create('create slide', {
file: './lib/novo12.ppt',
title: 'create slide teste'
})
var kue = require('kue')
, jobs = kue.createQueue();
var spawn = require('child_process').spawn;
jobs.process('create slide', function (job, done) {
ppt2pdf(job.data.file, done);
console.log('Job', job.id, 'is process');
});
jobs.on('job enqueue', function (id, type) {
console.log('job %s got queued', id);
var kue = require('kue'),
jobs = kue.createQueue();
var spawn = require('child_process').spawn;
var Apresentacao = require('../models/apresentacao');
var path = require('path');
var fs = require('fs');
module.exports = function (io) {
io.on('connection', function (socket) {
jobs.process('create slide', 5, function (job, done) {
ppt2image(job.data.file, done);
@IgorDePaula
IgorDePaula / angular_fill_table.html
Created January 27, 2015 21:07
Preencho cada posicao celular com um conteudo diferente
<!DOCTYPE html>
<html ng-app="App">
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
table{
border:1px solid red;
border-collapse: collapse;

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

<?php
$vencimento = 30;
$firstPag = '30/01/2015';
$parcelas = 15;
$data = new DateTime(implode('-', array_reverse(explode('/', $firstPag))) . ' 00:00:00');
$data_parcelas = array();
while ($parcelas) {
$mes = $data->sub(new DateInterval('P2D'))->add(new DateInterval('P1M'))->format('n');
@IgorDePaula
IgorDePaula / colors.php
Created April 29, 2015 00:18
Class to generate colored strings on terminal.
<?php
class Colors {
private $foreground_colors = array();
private $background_colors = array();
public function __construct() {
// Set up shell colors
$this->foreground_colors['black'] = '0;30';
$this->foreground_colors['dark_gray'] = '1;30';
function(req, res){
//query
var query = req.params();//ou req.params('campo');
var post = req.body;//ou req.body.campo;
res.send('template');//ou res.json('sem comentarios')
}
# in case of conflict with local nginx:
# make sure in all *.confs (
# also in default and example to avoid error like
# 'nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)'
# )
# set for instance "listen 127.0.0.1:80" instead of "listen *:80"
# docker & network settings
DOCKER_IMAGE_NAME="maxexcloo/nginx-php" # build of nginx-php - for example
DOCKER_CONTAINERS_NAME="nginx_bridged" # our container's name
<?php
//codigo do teste
$I->click('#select2-chosen-2');
$I->fillField('#s2id_autogen2_search', 'Masculino');
$I->click('[value="M"]');
?>