Skip to content

Instantly share code, notes, and snippets.

View eduardo-matos's full-sized avatar

Eduardo Matos eduardo-matos

View GitHub Profile
@eduardo-matos
eduardo-matos / gist:4040675
Created November 8, 2012 18:43 — forked from tjlytle/gist:1293424
SendGrid Configuration for Zend Framework
<?php
$config = array(
'username' => 'sendgridusername',
'password' => 'sendgridpassword',
'auth' => 'plain'
);
$transport = new Zend_Mail_Transport_Smtp('smtp.sendgrid.net', $config);
$mail = new Zend_Mail();
@eduardo-matos
eduardo-matos / gist:4379500
Created December 26, 2012 10:35
Comandos comuns do Sencha CMD
// Criar aplicação
sencha -sdk {{caminho do SDK}} generate app {{nome da aplicação}} {{caminho da aplicação}}
// Compilar aplicação
sencha app build
@eduardo-matos
eduardo-matos / pre-commit
Last active December 10, 2015 14:58
Verificar se existe conflito antes do commit (GIT)
#!/bin/sh
conflitos=`git diff --staged --pretty="format:" --name-only -S"<<<<<<< HEAD"`;
if [[ $conflitos != '' ]]; then
echo "";
echo "";
echo "Existem conflitos a serem resolvidos nos seguintes arquivos:";
# texto preto, background vermelho
echo -e "\E[30;41m";
@eduardo-matos
eduardo-matos / index.html
Last active December 11, 2015 01:58
Smooth scroll com Dojo Toolkit
<span class="p1">Paragraph 1</span>
<span class="p2">Paragraph 2</span>
<span class="p3">Paragraph 3</span>
<span class="p4">Paragraph 4</span>
<span class="p5">Paragraph 5</span>
<div id="p1" class="ltext">
<div class="header">Paragraph 1</div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris urna lorem, pretium in fringilla nec, interdum quis turpis. Donec urna metus, pretium feugiat luctus vitae, ullamcorper nec arcu. Integer dapibus sollicitudin convallis. Integer non tortor sit amet ante adipiscing pulvinar. Curabitur nec nulla non sem convallis lobortis quis quis urna. Quisque sed augue eu nisl commodo faucibus. Pellentesque egestas dui sed nisi ornare egestas. Morbi tempus molestie viverra. Vivamus aliquet urna et sem accumsan sit amet sagittis erat rutrum. Aliquam erat volutpat. Nullam semper mi at augue luctus aliquet. Morbi felis risus, mattis non vulputate vel, pellentesque et mauris. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam bib
@eduardo-matos
eduardo-matos / Exemplo
Last active December 11, 2015 02:18
Implementação de Lazyload em Dojo Toolkit
http://jsfiddle.net/6Xeen/3/
@eduardo-matos
eduardo-matos / phpunit.xml
Created January 19, 2013 11:29
PHPUnit Configuration
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
@eduardo-matos
eduardo-matos / build.xml
Created January 23, 2013 13:19
Apache Ant Build.xml para compilar projetos com Dojo Toolkit + SASS.
<project name="Builder" default="build.all" basedir="./">
<property name="dir.js.builder" value="js/src/util/buildscripts/build.bat" />
<property name="dir.js.src" value="js/src" />
<property name="dir.css.src" value="css/src" />
<!-- Compile SASS -->
<target name="compile-css">
<echo>Compilando CSS...</echo>
<exec executable="cmd">
@eduardo-matos
eduardo-matos / grid.js
Last active May 22, 2019 06:45
Enable text selection ExtJS grids.
Ext.define('Mother.Fucking.Grid', {
extend: 'Ext.grid.Panel',
// Lots of configuration...
viewConfig: {
enableTextSelection: true
}
@eduardo-matos
eduardo-matos / MyModule.js
Last active December 13, 2015 21:19
Pausable events on Dojo Toolkit
define('MyModule', [
'dojo/_base/declare',
'dojo/Evented'
], function (
declare,
Evented
) {
var fooCount = 0;
return declare([Evented], {
@eduardo-matos
eduardo-matos / .editorconfig
Created February 18, 2013 11:37
My .editorconfig options
root = true
[*]
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
end_of_line = lf