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
# Redis configuration file example. | |
# | |
# Note that in order to read the configuration file, Redis must be | |
# started with the file path as first argument: | |
# | |
# ./redis-server /path/to/redis.conf | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# |
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
defmodule HappyNumbers do | |
def happy?(n) do | |
do_happy?(n, []) | |
end | |
defp do_happy?(1, _sequence), do: true | |
defp do_happy?(n, sequence) do | |
if Enum.member?(sequence, n) do | |
false |
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
# Can anybody explain why this happens? | |
name = "John Doe" | |
name.gsub(/John/, "\\'") | |
# " Doe Doe" |
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
#recibo.column.span-24 | |
.column.span-16.prepend-4 | |
%h1.titulo RECIBO | |
.column.span-4.last | |
%h2=number_to_currency @recibo.valor_total | |
.texto-recibo.column.span-24.last | |
%p | |
| |
= "Recebi de #{@recibo.recebido_de}, a importância de #{number_to_currency @recibo.valor_total} " |
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
# encoding: utf-8 | |
class Agendamento::Marcacao < Agendamento::Agendamento | |
belongs_to :procedimento, class_name: 'Agendamento::Procedimento' | |
belongs_to :convenio | |
belongs_to :paciente | |
belongs_to :atendimento | |
validates_presence_of :horario, :procedimento |
NewerOlder