Skip to content

Instantly share code, notes, and snippets.

View vedovelli's full-sized avatar
💭
🚀

Fábio Vedovelli vedovelli

💭
🚀
View GitHub Profile
@vedovelli
vedovelli / VXDateUtil.as
Created May 2, 2011 23:45
Actionscript class to return the first and last days of the month from a given Date object
/***************************************
Copyright (c) 2011 vedovelli@vxtra.org
http://www.vxtra.org
Class: https://gist.github.com/952583
Usage: https://gist.github.com/952590
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2011 vedovelli@vxtra.org
http://www.vxtra.org
Class: https://gist.github.com/952583
Usage: https://gist.github.com/952590
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
root@cpro1127:~/local# npm install forever
> daemon@0.3.0 preinstall /root/node_modules/forever/node_modules/daemon
> node-waf configure build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
@vedovelli
vedovelli / SmartyConnect.php
Created January 8, 2012 18:22
SmartyConnect.php
<?php
require_once 'smarty/libs/Smarty.class.php';
class SmartyConnect extends Smarty{
function SmartyConnect(){
parent::__construct();
$this->caching = false;
@vedovelli
vedovelli / vaga_gera.txt
Created February 6, 2012 13:11
Vaga para programador PHP senior em São Paulo
Requisitos para o cargo
· Análise e Desenvolvimento de aplicações em PHP/MySQL
· Programação Orientada a Objetos (OOP)
· Programação de interface HTML(X), CSS, JAVA SCRIPT (JQUERY)
· Administração e Desenvolvimento de Componentes no JOOMLA (ESSENCIAL)
· Conhecimentos de Ambiente Linux
· Modelagem de Dados (MySQL / MSSQL)
· Análise e levantamento de requisitos funcionais
· Familiarizado com o conceito Tableless e Semântica
@vedovelli
vedovelli / phalcon_php.php
Created July 13, 2012 18:35
Phalcon PHP example to ask question on Google Group
<?php
class NaturezasJuridicasController extends Phalcon_Controller {
function indexAction(){
$this->view->setVar( 'naturezas_juridicas', Naturezas_Juridicas::find() );
}
function listaAction(){
$this->view->setRenderLevel(Phalcon_View::LEVEL_NO_RENDER);
@vedovelli
vedovelli / ved_angularjs.js
Created July 19, 2012 14:00
AngularJS and PhalconPHP
// With this, the $_POST global is empty
$http({
method: 'post',
url: url+'/remover',
data: unidade
}).success(function(data){
wi.console.log(data);
});
// By the other hand, using jQuery my data reaches PHP
@vedovelli
vedovelli / mail.php
Created August 2, 2012 18:24
Script envio email
$recipients[] = "banheirasalbacete@gmail.com";
$recipients[] = "vedovelli@gmail.com";
$recipients[] = $dados['EMAIL_REVENDA'];
$subject = "Orcamento Albacete - Num. $orcamento_id";
$email = "banheirasalbacete@gmail.com";
$transport = Swift_SmtpTransport::newInstance('smtp.gmail.com', 465, "ssl")
->setUsername('banheirasalbacete@gmail.com')
->setPassword('senha_aqui');
@vedovelli
vedovelli / select2_directive.js
Created September 18, 2012 12:18
Select2 directive
rialabs.directive('riaSelect', function(){ /* This direct will be used as an HTML attribute: ria-select="{}" */
/* http://docs.angularjs.org/guide/directive */
return {
restrict: 'A', /* Limitates the use as an HTML attrbute */
require: 'ngModel', /* Requires the model to be used in this directive */
compile: function(tElement, tAttrs){ /* In the compile function, the <select> element is transformed by the plugin. */
var el = jQuery(tElement); /* tElement is a plain <select> */
el.select2(); /* Uses the plugin select2() */
@vedovelli
vedovelli / riaFormitem.js
Created September 18, 2012 12:49
bootstrap inline form item
rialabs.directive('riaFormitem', function($compile){
return {
restrict: 'A',
require: 'ngModel',
compile: function(tElem, tAttrs){
return function ($scope, $element, $attrs, $model){