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
def descerebrado | |
@sentido_comun -= @tacto + @delicadeza | |
end | |
descerebrado == pendejo | |
#True |
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
def search(options = {}) | |
search = false | |
blocked_domains_filter = "" | |
blocked_channels_filter = "" | |
if options[:jobseeker] | |
blocked_domains_filter = " not ( " + options[:jobseeker].blocked_domains.map{|bd| bd.domain}.join(" or ") + " )" unless options[:jobseeker].blocked_domains.empty? || self.keywords.blank? | |
blocked_channels_filter = " not ( " + options[:jobseeker].blocked_channels.map{|bd| bd.channel}.join(" or ") + " )" unless options[:jobseeker].blocked_channels.empty? || self.keywords.blank? | |
end | |
#begin | |
if !self.placemark.nil? |
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
class CalendarMonthsController < ApplicationController | |
caches_embedded :mini_calendar, :ttl => 60.minutes | |
def mini_calendar | |
user_id = params[:user_id] | |
@month_offset = params[:month_offset] ? params[:month_offset].to_i : 0 | |
@year = Date.today.year | |
@month = Date.today.to_time.advance(:months => @month_offset).to_date.month |
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
def current_account_controller_access | |
@current_account_controller_access ||= Hash[*current_account.features.collect{|feature| [feature.controller_name, feature.actions] }.flatten] | |
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
require 'rest_client' | |
require 'json' | |
################### | |
# CONF # | |
################### | |
# The smallest amount of changed documents before the views are updated | |
MIN_NUM_OF_CHANGED_DOCS = 10 |
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
########### pio.la | |
# => Ver Configuracion | |
# cat /usr/local/mongodb/mongod.conf | |
# => Iniciar mongo | |
# sudo mongod --config /usr/local/mongodb/mongod.conf | |
require "mongomapper" | |
MongoMapper.connection = Mongo::Connection.new('127.0.0.1', 27017) | |
MongoMapper.database = 'piola' |
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
# usage: | |
# field_labeled('Select your address').should have_option("Home Address") | |
Spec::Matchers.define :have_option do |expected| | |
def options_for(select_field) | |
select_field.options.map(&:inner_text) | |
end | |
match do |select_field| | |
raise "Field is not a SelectField" unless select_field.kind_of?(Webrat::SelectField) | |
options_for(select_field).include?(expected) |
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
if ($host ~* ^([^.]+\.[^.]+)$) { | |
set $host_without_subdomain $1; | |
rewrite ^\/(\w+)(\/.*)$ http://$1.$host_without_subdomain$2 break; | |
} |
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
upstream example { | |
server unix:/data/example/shared/tmp/pids/example.sock; | |
} | |
server { | |
listen 80; | |
server_name *.example.com; | |
root /data/example/current/public; |
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
# full reinstall mysql server | |
apt-get remove --purge 'mysql-server.*' | |
rm -rf /etc/mysql | |
rm -rf /var/run/mysqld | |
rm -rf /db/mysql | |
rm -rf /db/mysql | |
rm -rf /var/lib/mysql | |
apt-get install mysql-server |
OlderNewer