This file contains 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
#...esse eh um teste do gist public,,,, para ver se ele deleta depois | |
require 'privacy' |
This file contains 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
#! /bin/bash | |
NAME=mongodb | |
TRIGGER='/etc/init.d/mongodb start' | |
PIDFILE=/var/run/$NAME.pid | |
DAEMON=/usr/bin/mongod | |
ensure_running() { | |
if ! running ; then | |
echo "Starting at: `date`" |
This file contains 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
"the uggglyest thing i ever build to sort random... but thats it | |
let l:new_list = [] | |
for item in g:kata_1 | |
let l:indx = Urndm(0,5) | |
let l:item_to_move = deepcopy(g:kata_1[l:indx]) | |
call remove(g:kata_1, l:indx) | |
call add(g:kata_1, l:item_to_move) | |
endfor | |
g:kata_1 = deepcopy(l:new_list) |
This file contains 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
# get path do ... end | |
snippet get | |
get '/${1:path}'${2:, options} do | |
${3:# ...} | |
end | |
# post path do ... end | |
snippet post | |
post '/${1:path}'${2:, options} do | |
${3:# ...} | |
end |
This file contains 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
let g:gitgrepprg="git\\ grep\\ -n" | |
let g:gitroot="`git rev-parse --show-cdup`" | |
function! GitGrep(args) | |
let grepprg_bak=&grepprg | |
exec "set grepprg=" . g:gitgrepprg | |
execute "silent! grep! -i -I -n " . a:args . " " . g:gitroot | |
botright copen | |
let &grepprg=grepprg_bak | |
exec "redraw!" |
This file contains 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
;(function (global) { | |
if ("EventSource" in global) return; | |
var reTrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g; | |
var EventSource = function (url) { | |
var eventsource = this, | |
interval = 500, // polling interval | |
lastEventId = null, |
This file contains 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 Browser */ | |
jQuery.uaMatch = function( ua ) { | |
ua = ua.toLowerCase(); | |
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) || | |
/(webkit)[ \/]([\w.]+)/.exec( ua ) || | |
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || | |
/(msie) ([\w.]+)/.exec( ua ) || | |
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || | |
[]; |
This file contains 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
function fix_ratio(ele){ | |
var img_ratio = 1.6;//ele.width()/ele.height(); 1920/1200 | |
var window_ratio = $(window).width()/$(window).height(); | |
if(img_ratio>window_ratio){ | |
ele.css("height","100%").css("width","auto"); | |
}else{ | |
ele.css("width","100%").css("height","auto"); | |
} | |
} |
This file contains 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 id="colunistas_box" style="display: block;"> | |
<div id="colunistas">COLUNISTAS</div> | |
<div id="colunistas_prev"> | |
<img src="./img/colunistas_home/arrow_prev.gif"> | |
</div> | |
<div id="colunistas_next"> | |
<img src="./img/colunistas_home/arrow_next.gif"> | |
</div> |
This file contains 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
function title_tip(next) { | |
var iframe = $(".fancybox-iframe").attr("src"); | |
if (next) { | |
var title = $(".fancy[href='"+iframe+"']").next().find(".news_t").text(); | |
} else { | |
var title = $(".fancy[href='"+iframe+"']").prev().find(".news_t").text(); | |
}; | |
if (title == "") title = (next?"Próxima matéria":"Matéria anterior"); | |
return title; |
OlderNewer