Skip to content

Instantly share code, notes, and snippets.

View davidmaogomezz's full-sized avatar

David Mauricio Gomez Zapata davidmaogomezz

View GitHub Profile
@davidmaogomezz
davidmaogomezz / script.rb
Last active September 9, 2020 22:02
Send emails
emails = []
emails.each do |email|
@user = User.find_by_email(email)
@password = (0...8).map { [('a'..'z'), ('A'..'Z')].map(&:to_a).flatten[rand([('a'..'z'), ('A'..'Z')].map(&:to_a).flatten.length)] }.join
@user.password = @password
@user.password_confirmation = @password
raw, hashed = Devise.token_generator.generate(User, :reset_password_token)
@user.reset_password_token = hashed
@user.reset_password_sent_at = Time.now.utc
@url = Utils::GetUrlEnv.call(@user)
@davidmaogomezz
davidmaogomezz / index.html
Created September 7, 2020 22:48
Temporizador React
<div id="root"></div>
@davidmaogomezz
davidmaogomezz / docker-compose.yml
Last active March 15, 2020 15:38
Docker-compose.yml for connect database rails postgres docker
version: '3'
services:
db:
image: postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
volumes:
- ./tmp/db:/var/lib/postgresql/data
web:
build: .
@davidmaogomezz
davidmaogomezz / factorial.rb
Created January 21, 2020 20:58
factorial while
numero = 7
factorial = 1
while numero > 0
factorial = factorial * numero
numero -= 1
end
puts factorial
@davidmaogomezz
davidmaogomezz / while.rb
Created January 21, 2020 20:37
Ciclo while
cont = 0
while cont <= 10
puts "el valor de cont es #{cont}"
cont += 1
end
@davidmaogomezz
davidmaogomezz / AngularJS with Firebase Demo.markdown
Created September 16, 2015 18:40
AngularJS with Firebase Demo
@davidmaogomezz
davidmaogomezz / AngularJS: realtime multiuser TODO list with Firebase.markdown
Last active September 16, 2015 18:53
AngularJS: realtime multiuser TODO list with Firebase
@davidmaogomezz
davidmaogomezz / Ionic Tabs and Menu.markdown
Created September 16, 2015 18:29
Ionic Tabs and Menu