Do Androids Dream of Electric Sheep?
Of Mice and Men
The Stranger
A Clockwork Orange
Breakfast at Tiffany's
The Willows
The Old Man and the Sea
Frankenstein
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 prime_factorization(num) | |
| prime = Enumerator.new do |y| | |
| mem = [] | |
| is_prime = lambda { |e| mem.find { |_| e.gcd(_) != 1 } } | |
| 2.upto(num) do |n| | |
| unless is_prime[n] | |
| mem << n | |
| y << n | |
| 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
| code = "__ == __ == Date.parse(date.sub(/(\d+)[-\/](\d\d).(\d{4})/,'\\3-\\1-\\2')).strftime('%b %d, %Y')" | |
| sub = "Date.parse(date.sub(/(\d+)[-\/](\d\d).(\d{4})/,'\\3-\\1-\\2')).strftime('%b %d, %Y')" | |
| code.gsub("__", sub) # Date.parse(date.sub(/(d+)[-/](dd).(d{4})/,'--'))... | |
| code["__"] = sub # only fill in one at a time. fails when sub = "__method__" | |
| code.split("__").join(sub) # ugly but seems to work |
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
| " this goes in ~/.vim/after/indent/html.vim | |
| let g:html_indent_tags = g:html_indent_tags . '\|li\|p' |
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
| " set up tabs for all files (recommended) | |
| set ts=2 | |
| set et | |
| set softtabstop=2 | |
| set sw=2 | |
| " OR | |
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
| dadavis@dhcp-230-216 ~ % katello -u admin -p admin ping | |
| Service unavailable or restarting, try later |
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
| # | |
| # Copyright 2012 Red Hat, Inc. | |
| # | |
| # This software is licensed to you under the GNU General Public | |
| # License as published by the Free Software Foundation; either version | |
| # 2 of the License (GPLv2) or (at your option) any later version. | |
| # There is NO WARRANTY for this software, express or implied, | |
| # including the implied warranties of MERCHANTABILITY, | |
| # NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should | |
| # have received a copy of GPLv2 along with this software; if not, see |
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
| factory :user do | |
| username "ehelms" | |
| email "ehelms@redhat.com" | |
| password "Secret1234" | |
| disabled false | |
| trait :with_admin_role do | |
| after_build do |user| | |
| admin_role = Role.find_by_name("ADMINISTRATOR") || FactoryGirl.build(:admin_role) | |
| user.roles = [admin_role] |
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
| # set environment variable BUNDLER_ENABLE_RPM_PREFERRING to 'true' to enable bundler patch | |
| # if enabled bundler prefers rpm-gems even if they are older version then gems in gem-repo | |
| if ENV['BUNDLER_ENABLE_RPM_PREFERRING'] == 'true' | |
| require File.join(File.dirname(__FILE__), 'lib', 'bundler_patch_rpm-gems_preferred') | |
| end | |
| # load Katello configuration | |
| path = File.expand_path('../lib', __FILE__) | |
| $LOAD_PATH << path unless $LOAD_PATH.include? path | |
| require 'katello_config' |
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
| λ f16p2 ~ks → λ git pulpv2_merge* → rake minitest:glue mode=all | |
| /home/dadavis/Projects/katello/src/app/models/foreman/architecture.rb:14: warning: toplevel constant IndexedModel referenced by Resources::AbstractModel::IndexedModel | |
| /home/dadavis/Projects/katello/src/app/models/foreman/domain.rb:14: warning: toplevel constant IndexedModel referenced by Resources::AbstractModel::IndexedModel | |
| /home/dadavis/Projects/katello/src/app/models/foreman/subnet.rb:14: warning: toplevel constant IndexedModel referenced by Resources::AbstractModel::IndexedModel | |
| /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/test_case.rb:14: warning: already initialized constant Mocha | |
| Run options: --seed 34704 | |
| # Running tests: | |
| undefined method `destroy_repo' for nil:NilClass |