This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="field"> | |
<%= f.label 'Unidades' %><br /> | |
<%= select_tag(:unidades, options_for_select(@unidades.map {|s| [s.nome, s.codigo]}, @unidades_selecionadas), :multiple => true, :size => 6 ) %><input type="checkbox" id="selecionar_todas_unidades"/>todos</p> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 3 > /proc/sys/vm/drop_caches |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This alias adds a git amend command that will reuse the current commit message when it amend it. | |
> git config --global alias.amend 'commit --amend -C HEAD' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.com.jalex.util; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import javax.servlet.http.HttpServletResponse; | |
import br.com.caelum.vraptor.interceptor.TypeNameExtractor; | |
import br.com.caelum.vraptor.ioc.Component; | |
import br.com.caelum.vraptor.serialization.ProxyInitializer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.validator.addMethod("notEqualTo", | |
function(value, element, param) { | |
return ( this.optional(element) || value != $(param).val() ); | |
}, "Campos não devem ser iguais."); | |
$("#formAlterarSenha").validate({ | |
rules : { | |
senhaatual : "required", | |
senhanova : { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.normalize = function() { | |
var translate = { "à":"a", "á":"a", "â":"a", "ã":"a", "ä":"a", "å":"a", "æ":"a", "ç":"c", "è":"e", "é":"e", "ê":"e", "ë":"e", "ì":"i", "í":"i", "î":"i", "ï":"i", "ð":"d", "ñ":"n", "ò" :"o", "ó":"o", "ô":"o", "õ":"o", "ö":"o", "ø":"o", "ù":"u", "ú":"u", "û":"u", "ü":"u", "ý":"y", "þ":"b", "ß" :"s", "à":"a", "á":"a", "â":"a", "ã":"a", "ä":"a", "å":"a", "æ":"a", "ç":"c", "è":"e", "é":"e", "ê":"e", "ë" :"e", "ì":"i", "í":"i", "î":"i", "ï":"i", "ð":"d", "ñ":"n", "ò":"o", "ó":"o", "ô":"o", "õ":"o", "ö":"o", "ø" :"o", "ù":"u", "ú":"u", "û":"u", "ý":"y", "ý":"y", "þ":"b", "ÿ":"y", "ŕ":"r", "ŕ":"r" } | |
, translate_RE = /[àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŕŕ]/gim; | |
return this.replace( translate_RE, function( match ){return translate[ match ]} ); | |
}; | |
// "ïñtèŕñåtïøñãlízátïöñ".normalize(); |