Skip to content

Instantly share code, notes, and snippets.

@grantspeelman
grantspeelman / all_email_provider_domains.txt
Created June 15, 2022 22:13 — forked from ammarshah/all_email_provider_domains.txt
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
@grantspeelman
grantspeelman / graphql.rake
Last active December 6, 2021 23:23
Rake tasks to dump ruby graphql for use with graphql code generators
namespace :graphql do
def write_update_file(filename, content)
return puts("-- #{filename}") if File.exist?(filename) && File.read(filename) == content
puts "Updating #{filename}"
File.open(filename, 'w') { |file| file << content }
end
task dump_schema: :environment do
system 'mkdir -p tmp/graphql'
@grantspeelman
grantspeelman / Dockerfile
Created March 15, 2017 19:31
Ruby on Rails development with docker-compose, spring and PostgreSQL
# 1: Use ruby 2.3.3 as base:
FROM ruby:2.3.3
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev
# 2: We'll set the application path as the working directory
WORKDIR /usr/src/app
# 3: We'll set the working dir as HOME and add the app's binaries path to $PATH:
ENV HOME=/usr/src/app PATH=/usr/src/app/bin:$PATH
@grantspeelman
grantspeelman / persona_session.rb
Created March 31, 2016 00:11
Acceptance testing multiple sessions/actors using capybara
class PersonaSession
include Capybara::DSL
include Capybara::Email::DSL
# override to stop usage of global current_session
def page
@page ||= Capybara::Session.new(Capybara.current_driver, Capybara.app)
end
def click_link_in_email(link_name)
@grantspeelman
grantspeelman / rails_scaffold_exercise.md
Last active February 16, 2016 06:58
Build and house/resident registry using scaffolds

Build a Simple rails app using scaffolds

Model Design

House
  Date Built (date)
  Address (string)
  City (string)
  Active (boolean)
 
@grantspeelman
grantspeelman / Gemfile
Last active December 16, 2020 13:11
Example Gemfile files preparing for the next rails upgrade (https://grant-ps.blog/2017/07/03/upgrading-ruby-on-rails-in-smallish-steps/)
@next_upgrade ||= false
source 'https://rubygems.org'
if @next_upgrade
gem 'rails', '6.0.0.rc2'
else
gem 'rails', '~> 5.2.0'
end
# rest of gems below ....