Skip to content

Instantly share code, notes, and snippets.

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

Jean Carlo Nascimento suissa

🏠
Working from home
  • Oncorithms Institute
  • Brasil
View GitHub Profile
@suissa
suissa / cakephp_sum_example.php
Created October 31, 2012 14:42
SUM in CakePHP
$this->ContaCorrente->find('first',
array('fields' =>
array('SUM(ContaCorrente.valor) AS total'),
'conditions'=>array('ContaCorrente.moeda' => 'REAIS')
)
);
@suissa
suissa / README.md
Created January 15, 2013 18:26 — forked from zenorocha/README.md

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

/*
* Check all checkboxes for facebook
*/
var checks = document.getElementsByClassName("checkbox");
for(var i = 0; i < checks.length; i++){ checks[i].checked = true; }
@suissa
suissa / create-icon.less
Created February 17, 2013 15:26
Single Responsibility with LESS
.setSize(@w, @h){
width: @w;
height: @h;
}
.iconSize(@size){
.setSize(@size);
}
.iconCreate(@background, @position: left, @size: 16px){
background-image: @background;
background-repeat: no-repeat;
@suissa
suissa / README.md
Last active December 18, 2015 07:59 — forked from necolas/README.md

Componentes de Template

Usado para prover templates estruturados.

Padrão

t-template
t-template--modificador
t-template__subcomponente--modificador

Plano de Ensino

HTML5

  • História
  • Evolução
  • Semântica
  • Acessibilidade
  • API's
@suissa
suissa / api.js
Created July 1, 2013 12:13 — forked from fwielstra/api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
<?php
class Cidades_estados_pais extends CI_Model {
public function index() {
//-----------------------------------------------
// Se preferir altere o nome da tabela e colunas
//
$tabela = 'sys_cidades_estados_pais';