Skip to content

Instantly share code, notes, and snippets.

View luizkowalski's full-sized avatar
:atom:
bug fixes and performance improvements

Luiz Eduardo Kowalski luizkowalski

:atom:
bug fixes and performance improvements
View GitHub Profile
package br.com.athus.util;
import java.awt.Desktop;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
On the long list of the reasons why an all Flash site sucks, this dialogue, that I found somewhere is awesome. And, unfortunately, quite realistic.
* Dialogue
Ever try selling a client over the phone with a Flash based site? It goes something like this:
- Ok. Wait for the loader bar to finish? Is it loaded? Great.
- Wait for a second while the intro animation runs.
- Click on the pulsing green button.
- See the dancing donkey in the corner? Click that.
- Click on the donkey's right eye.
$ echo 'export PATH=$PATH:$HOME/.gem/ruby/1.9.1/bin' >> ~/.bashrc && . ~/.bashrc
@luizkowalski
luizkowalski / gist:2413728
Created April 18, 2012 13:54 — forked from Chavao/gist:1974196
Busca de endereço por CEP
<?
function getCEP($psCEP)
{
echo utf8_encode(urldecode(trim(@file_get_contents('http://cep.republicavirtual.com.br/web_cep.php?cep='.urlencode($psCEP).'&formato=javascript'))));
// Retorna var resultadoCEP = { 'uf' : 'UF', 'cidade' : 'Cidade', 'bairro' : 'Bairro', 'tipo_logradouro' : 'Avenida', 'logradouro' : 'Logradouro', 'resultado' : '1', 'resultado_txt' : 'sucesso - cep completo' }
}
?>
class User
include Mongoid::Document
include Mongoid::Timestamps
# Include default devise modules. Others available are:
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
## Database authenticatable
field :email, :type => String, :null => false, :default => ""
<div class="row">
<div class=span6>
<div>
<h2>Seus dados</h2>
</div>
<table class="table table-bordered table-striped">
<tr>
<th>Nome</th>
App::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
App::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
config.i18n.available_locales = ['pt-BR']
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
@luizkowalski
luizkowalski / highchartslang
Created June 11, 2012 19:40
Configurar o highcharts em pt-br
Highcharts.setOptions({
lang: {
months: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
weekdays: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'],
loading: ['Atualizando o gráfico...aguarde']
}
});
footer a{
color: #3F67AD;
}
#console{
height: 250px;
overflow: auto;
}
#console li pre {
text-align: center;