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
| .floatingSquare { | |
| background: #FFF; | |
| display: block; | |
| height: 100px; | |
| left: 45%; | |
| opacity: 0.5; | |
| position: absolute; | |
| top: 45%; | |
| width: 100px; | |
| } |
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
| <?php | |
| /** | |
| * @author Benjamin Kuker | |
| * @description A simple user class. Normally, this would interact with a database and form validation code, but for | |
| * demonstration purposes, I'm simply throwing exceptions when errors occur. | |
| * | |
| * Also, please note: I rarely, if ever, use static methods or classes because they aren't easily testable or | |
| * extensible and I almost always want to work with an object. If I were to need a static method, I would implement a | |
| * function instead. See http://stackoverflow.com/questions/1185605/ for more. Because I probably wouldn't use it in | |
| * real life, and in order to give you a more accurate picture of how I code, I've ommitted the static method. |
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
| (function($) { | |
| $.widget("ui.demographics_filter", { | |
| _initialize: function(){ | |
| this.getFilters(); | |
| this._wire(); | |
| }, | |
| _wire: function(){ | |
| var self = this; | |
| $('.btn-group').click(function(){ |
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 format_data | |
| tasks = self.task_completions.select( | |
| "task_completions.skipped, | |
| task_completions.created_at, | |
| task_completions.timestamp, | |
| demographics.gender, | |
| demographics.age, | |
| demographics.location, | |
| demographics.ethnicity, | |
| demographics.income, |
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
| //Create URL slug | |
| var urlText = new Element('a', { | |
| 'href':'#', | |
| 'id':'fullUrlToggle', | |
| 'html':$('viewFullUrl').get('value') | |
| }); | |
| $('urlLabel').appendText(' ').grab(urlText); | |
| $('fullUrlToggle').addEvent('click', function(e){ | |
| e.stop(); |
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
| var Hyphenator = new Class ({ | |
| Implements: [Events, Options], | |
| options: { | |
| separator: '-', | |
| trigger: 'keyup', | |
| prepend: '', | |
| allowed: /[^\w\d\s-]/g | |
| }, |
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 all | |
| if current_user.has_projects? | |
| @trial = current_user.trials.first | |
| @project = @trial.project | |
| else | |
| @trial = Trial.new | |
| @project = current_user.projects.first | |
| end | |
| @is_new = params[:new] |
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 update | |
| @admin = Admin::Admin.find(params[:id]) | |
| respond_to do |format| | |
| if params[:admin_admin][:change_password] | |
| #call update_password here | |
| else | |
| if @admin.update_attributes(params[:admin_admin]) | |
| flash[:success] = "'#{@admin.name}' was successfully updated." | |
| format.html { redirect_to admin_admins_path } |
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
| #user nobody; | |
| worker_processes 1; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; |
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
| require 'spec_helper' | |
| require "selenium/client" | |
| require "selenium-webdriver" | |
| describe "Pricing Page Exists" do | |
| attr_reader :selenium_driver | |
| alias :page :selenium_driver | |
| before(:all) do | |
| @verification_errors = [] |