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
class String | |
def reindent(by = 2) | |
self.gsub("\t", " " * by) | |
end | |
end |
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
class Hash | |
#for overriding keys | |
alias :with :merge | |
# for excluding keys | |
def except(*exclusions) | |
self.reject { |key, value| exclusions.include? key.to_sym } | |
end | |
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
class String | |
def reindent(by = 2) | |
self.gsub("\t", " " * by) | |
end | |
end | |
absolute_path = "/home/guimello/NetBeansProjects/ihouse" | |
dirs = ["#{absolute_path}/app/**", "#{absolute_path}/config/", | |
"#{absolute_path}/config/environments", |
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
@WebService() | |
public class CadastrarPessoa | |
{ | |
@WebMethod(operationName = "cadastrarPessoa") | |
public boolean cadastrarPessoa(@WebParam(name = "pessoa") Pessoa pessoa) | |
{ | |
return false; | |
} | |
@WebMethod(operationName = "editarPessoa") |
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.fn.resetForm = function() | |
{ | |
$(this).find(':input').each(function(){ | |
switch(this.type) | |
{ | |
case 'password': | |
case 'select-multiple': | |
case 'select-one': | |
case 'text': | |
case 'textarea': |
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
#!/usr/bin/env ruby | |
################################################################################ | |
# Require. | |
require 'rubygems' | |
require 'gmail' | |
require 'libnotify' | |
################################################################################ | |
# Reporter that checks for unread messages. |
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
caches_action :show, :expires_delta => 3.minutes#, :cache_path => Proc.new {|controller| controller.instance_variable_get(:@article).cache_key} |
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
# Used to graph results from autobench | |
# | |
# Usage: ruby autobench_grapher.rb result_from_autobench.tsv | |
# | |
# This will generate three svg & png graphs | |
require "rubygems" | |
require "scruffy" | |
require 'csv' | |
require 'yaml' |
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
pt-BR: | |
errors: | |
messages: | |
not_found: "não encontrado" | |
already_confirmed: "já foi confirmado" | |
not_locked: "não foi bloqueado" | |
devise: | |
failure: | |
unauthenticated: 'Para continuar, faça login ou registre-se.' |
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
#!/usr/bin/env ruby | |
################################################################################ | |
ENV["RAILS_ENV"] = ARGV[1] || 'development' | |
require File.dirname(__FILE__) + '/../config/environment' | |
require 'mechanize' | |
path = '/root/path' | |
File.open(File.join(path, 'climatempo.txt', 'w+')) do |f| |
OlderNewer