...
 
Commits (2)
......@@ -8,4 +8,5 @@
data/quotes.db.*
.env
*.png
*.jpg
\ No newline at end of file
*.jpg
src/env.cr
version: 1.0
shards:
admiral:
github: jwaldrip/admiral.cr
version: 1.9.0
halite:
github: icyleaf/halite
version: 0.10.4
pcf-parser:
github: l3kn/pcf-parser
version: 0.1.1
stumpy_core:
github: stumpycr/stumpy_core
version: 1.9.1
stumpy_png:
github: stumpycr/stumpy_png
version: 4.5.2
stumpy_utils:
github: stumpycr/stumpy_utils
version: 0.5.1
email:
github: arcage/crystal-email
version: 0.6.1
......@@ -8,17 +8,14 @@ targets:
main: src/testing.cr
dependencies:
admiral:
github: jwaldrip/admiral.cr
# crystagiri:
# github: madeindjs/crystagiri
halite:
github: icyleaf/halite
stumpy_png:
github: stumpycr/stumpy_png
version: "~> 4.5"
stumpy_utils:
github: stumpycr/stumpy_utils
# halite:
# github: icyleaf/halite
# stumpy_png:
# github: stumpycr/stumpy_png
# version: "~> 4.5"
# stumpy_utils:
# github: stumpycr/stumpy_utils
email:
github: arcage/crystal-email
crystal: 0.30.1
license: MIT
require "email"
require "./env" # ENV for variables
config = EMail::Client::Config.new(
ENV["EMAIL_HOST"],
ENV["EMAIL_POST"].to_i,
helo_domain: ENV["EMAIL_HOST"])
config.use_tls(EMail::Client::TLSMode::STARTTLS)
config.tls_context.add_options(OpenSSL::SSL::Options::NO_SSL_V2 | OpenSSL::SSL::Options::NO_SSL_V3 | OpenSSL::SSL::Options::NO_TLS_V1 | OpenSSL::SSL::Options::NO_TLS_V1_1)
config.tls_context.verify_mode = OpenSSL::SSL::VerifyMode::NONE
config.use_auth(
ENV["EMAIL_U"],
ENV["EMAIL_P"])
# client = EMail::Client.new(config)
EMail.send(config) do
from ENV["EMAIL_F"]
to ENV["EMAIL_T"]
subject "Test Email"
message <<-EOM
This is a test email
Some Text Here...
--
Insert Signature Here...
EOM
end
# WIP
def find_it(seq)
seq.each do |i|
puts seq[i]
# puts seq.join(",").to_s.count(seq[i])
end
end
puts find_it([20,1,-1,2,-2,3,3,5,5,1,2,4,20,4,-1,-2,5])
# puts find_it([1,1,2,-2,5,2,4,4,-1,-2,5])
def climb(n)
arr=Array(Int32).new
arr << n
while n > 1
n=(n/2).to_i
arr << n
end
arr.sort
end
puts climb(100)
def validate_pin(pin)
puts pin
case
when pin.includes?("a") then false
when pin.count("0-9", "a-z", "A-Z") > 4 then false
when pin.count("0-9", "a-z", "A-Z") < 4 then false
# when pin count < 4 then false
else true
end
end
puts validate_pin("-1884")
puts validate_pin("1884")
puts validate_pin("1asd84")
puts validate_pin("ddasdasggwge")