This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains 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
require 'spec_helper' | |
describe "member password recovery" do | |
# As a member who forgot my password | |
# I want to recover my site access easily | |
# | |
attr_accessor :current_email_address | |
specify "email recovery of a new password" do | |
member = make_activated_member |
This file contains 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
import Ember from 'ember'; | |
import config from 'medify-bmat-grader/config/environment'; | |
export function prefixRootUrl([href]) { | |
if (config.environment !== 'production') { | |
return `${config.rootURL}${href}`; | |
} else { | |
return href; | |
} | |
} |
This file contains 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
# an example, showing how to load for rspec and conditionally load for cucumber | |
# lives in whichever dir you set the other file to load | |
module ImageStepHelpers | |
def page_should_contain_image_link_for(image) | |
page.should have_xpath(%Q(//img[@src="#{image.url}"])) | |
end | |
def image_data_from_file(image) | |
image_file_path = Rails.root.join image.image.path |
This file contains 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
Vagrant.configure(2) do |config| | |
# Every Vagrant development environment requires a box. You can search for | |
# boxes at https://atlas.hashicorp.com/search. | |
config.vm.box = 'ubuntu/trusty64' | |
# Create a forwarded port mapping which allows access to a specific port | |
# within the machine from a port on the host machine. In the example below, | |
# accessing "localhost:8080" will access port 80 on the guest machine. | |
config.vm.network "forwarded_port", guest: 3000, host: 3000 |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Service.extend({ | |
redirectTo(href) { | |
window.location.href = href; | |
}, | |
replace(href) { | |
window.location.replace(href); | |
}, | |
reload() { |
This file contains 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
# last entry: | |
#static page routes | |
get '/home' => redirect('/') | |
root :to => 'static_pages#home' | |
get '*page', :to => 'static_pages#show', :constraints => {:page => %r{[\w\-\/]+}} |
This file contains 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
# -*- encoding : utf-8 -*- | |
class Sitemap | |
def self.static_view_templates | |
require 'fileutils' | |
template_paths = [] | |
FileUtils.cd Rails.root.join 'app', 'views', 'static_pages' do | |
erb_html_files = File.join "**", "*.html.erb" | |
template_paths = Dir.glob(erb_html_files) | |
end | |
remove_html_erb!(template_paths) |
This file contains 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
all: send-more-money donald | |
# use git clean -f for make clean, but confirm action | |
define gitCLEAN | |
puts 'ARE YOU SURE (git clean -f) ? y/n'; \ | |
puts %x(git clean -n); \ | |
exec('git clean -f') if gets.chomp =~ /^y/i | |
endef | |
clean: |
This file contains 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
Old tired programmers() -> | |
obviously trusted prolog, | |
others tried perl. | |
Oft they pondered() -> | |
of teams problems, | |
of telcos pains. | |
Onward they plodded() -> | |
obscure to programmers, |