- Intel 256 GB SSD Harddrive (SSDSC2CW240A3)
- 16 GB (2x8) DDR3 1333 MHz Crucial RAM
- AMD Radeon HD 6490M Graphics Card
- Some minor dents on the case
- Power supply with extension cord
- Battery Information:
- Cycle Count: 533
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
s = Student.find_by(email: 'mitch.lloyd@gmail.com') |
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
# Before | |
def show | |
if current_user.is_admin? | |
if params[:assignment].nil? | |
@assignments = Assignment.all | |
else | |
@assignments = Assignment.where(:student_id => params[:assignment][:id] ) | |
end | |
else |
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
# Before | |
def index | |
if current_user.is_student? | |
@assignments = current_user.assignments.order(created_at: :desc) | |
render "student_index" | |
elsif current_user.is_admin? | |
@current_student = params[:student] | |
@students = User.get_all_students | |
@average_grade = 0 |
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
def answer_iucu_challenge(question) | |
case question | |
when /what year/: return "1988" | |
when /what street/: return "Main Street" | |
when /father\'s middle name/: return "Jonathan" | |
when /what city/: return "Denver" | |
else "blah" | |
end | |
end | |
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'; | |
const { inject, computed } = Ember; | |
export default Ember.Controller.extend({ | |
myService: inject.service(), | |
appName: computed.reads('myService.value') | |
}); |
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
class Model extends Spine.Model | |
# This one always pulls the data from the server. | |
@fetchAndThen: (id, callback) -> | |
@fetch(id: id) | |
@one 'refresh', (docs) -> callback(docs[0]) | |
# This one pulls the data from the server if it isn't cached locally. | |
@remoteFind: (id, callback) -> | |
if @exists? id | |
callback @find(id) |
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
App.Document = DS.Model.extend | |
# some attributes here... | |
saveWhenDirty: (-> | |
@get('store').commit() if @get('isDirty') | |
).property('isDirty') |
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
App.debounce = (func, wait) -> | |
timeout = null | |
-> | |
context = this | |
args = arguments | |
immediate = true if args[0] and args[0].now | |
later = -> |
OlderNewer