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
#!/usr/bin/env ruby | |
# Get name file from https://www.census.gov/genealogy/www/data/1990surnames/names_files.html | |
names = File.readlines('dist.male.first.txt') | |
list = {} | |
letters = ('A'..'Z') | |
total_people = 40000 | |
last_name_freq = 0.01006 # Smith | |
letters.each do |letter| |
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
class ExternalEnvironment | |
def initialize | |
@account_ids = [] | |
yield self | |
ensure | |
clean_up | |
end | |
def create_account(data) | |
account = External::Account.create(data) |
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
def repositories(repositories_provider = RepositoriesProvider) | |
@repositories ||= repositories_provider.new() | |
end |
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
rails plugin new components/users --full --mountable --skip-sprockets --skip-spring --database=postgresql --skip-javascript --skip-turbolinks --skip-test-unit --skip-git --skip-keeps --dummy-path=spec/dummy --full --skip-bundle | |
rails plugin new components/users --full --mountable --skip-sprockets --skip-spring --skip-javascript --skip-turbolinks --skip-test-unit --skip-git --skip-keeps --dummy-path=spec/dummy --full --skip-bundle --skip-active-record |
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
git remote add ghpages \ | |
https://github.com/[USERNAME]/[USERNAME].github.io.git | |
git add . | |
git commit -m "Initial deploy to GitHub Pages" | |
git subtree push --prefix dist gh-pages master |
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
my_application/ | |
server/ | |
client/ |
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
git subtree push --prefix server heroku master |
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
class ZippyEnvironment | |
def initialize | |
@account_ids = [] | |
yield self | |
ensure | |
clean_up | |
end | |
def create_account(data) | |
account = Zippy::Account.create(data) |
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
describe "Some feature" do | |
it "behaves as expected" do | |
ZippyEnvironment.new do |zippy| | |
account = zippy.create_account( | |
name: "Pat", | |
email: "[email protected]" | |
) | |
# test your feature here | |
end |
OlderNewer