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
<?xml version="1.0" encoding="UTF-8" ?> | |
<schema name="basecamp" version="1.3"> | |
<types> | |
<!-- indexed/stored verbatim --> | |
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true" omitTermFreqAndPositions="true"/> | |
<!-- "true" or "false" --> | |
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true" omitNorms="true" omitTermFreqAndPositions="true"/> | |
<!-- binary data, base64 --> |
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
# .rvmrc_example => .rvmrc | |
# 1.9.1@projeto significa <ruby_version>@<projeto> | |
rvm use --create --install 1.9.1@projeto >/dev/null 2>&1 | |
if [[ -s "./dependencias.gems" ]]; then | |
if ! rvm gemset import dependencias.gems >/dev/null 2>&1; then | |
echo "ERROR: Nao foi possivel instalar as gems" >&2 | |
fi | |
fi |
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
# paginacao python | |
total_itens = 4831 | |
qtd_por_pagina = 10 | |
int(((int(total_itens/qtd_por_pagina))+(math.ceil((total_itens % float(qtd_por_pagina)) / float(qtd_por_pagina))))) | |
# 484 paginas |
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("#plan").remove() | |
jQuery("body").append("<table id='plan'>") | |
jQuery("table").each(function(){ | |
jQuery("#plan").append( | |
"<tr>"+ | |
"<td>"+jQuery(this).prevAll("p.p1:first").text()+"</td>"+ | |
"<td>"+jQuery(this).find("tr:eq(0) td:eq(0)").text()+"</td>"+ | |
"<td>"+jQuery(this).find("tr:eq(0) td:eq(1)").text()+"</td>"+ | |
"<td>"+jQuery(this).find("tr:eq(2) td:eq(1)").text()+"</td>"+ | |
"</tr>" |
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
ffmpeg -f oss -ar 44100 -ac 2 -i /dev/dsp -f x11grab -s 1600x1200 -r 15 -i $DISPLAY -qscale 4 -y $(date +%s).mov |
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
// fn to handle jsonp with timeouts and errors | |
// hat tip to Ricardo Tomasi for the timeout logic | |
$.getJSONP = function(s) { | |
s.dataType = 'jsonp'; | |
$.ajax(s); | |
var t = 0, cb = s.url.match(/callback=(\w+)/)[1], cbFn = window[cb]; | |
var $script = $('head script[src*='+cb+']'); | |
if (!$script.length) | |
return; // same domain request |
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
## System update ######################################################################### | |
aptitude update | |
aptitude -y safe-upgrade | |
aptitude -y install ruby ruby1.8-dev libopenssl-ruby1.8 rdoc ri irb build-essential \ | |
wget ssl-cert autotools-dev fakeroot dh-make automake autoconf libtool \ | |
help2man libicu38 libreadline5-dev libicu-dev libcurl4-openssl-dev git-core \ | |
htop links curl screen vim ec2-api-tools lsb-base libxml2 libxml2-dev \ | |
libxslt1.1 libxslt1-dev xfsprogs sun-java6-jdk erlang-nox logrotate \ | |
python-simplejson whois dig |
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
/* requires jQuery 1.3.2 minimum */ | |
$.trocaAcentosECaracteresEspeciais = function (texto) { | |
var afrom = "á,à,ã,â,ä,Á,À,Ã,Â,Ä"; | |
var efrom = "é,è,ê,ë,É,È,Ê,Ë"; | |
var ifrom = "í,ì,î,ï,Í,Ì,Î,Ï"; | |
var ofrom = "ó,ò,õ,ô,ö,Ó,Ò,Õ,Ô,Ö"; | |
var ufrom = "ú,ù,û,ü,Ú,Ù,Û,Ü"; | |
var outrosfrom = "ñ,Ñ,ç,Ç,&,@"; | |
var from = afrom + "," + efrom + "," + ifrom + "," + ofrom + "," + ufrom + "," + outrosfrom; |
NewerOlder