I hereby claim:
- I am maxehmookau on github.
- I am maxw (https://keybase.io/maxw) on keybase.
- I have a public key whose fingerprint is AF87 B45A 396D 80E6 3D83 B4CC 38EC 5C7C 4E61 2C87
To claim this, I am signing this object:
class Customer | |
def self.active | |
get all customers where order total is above £100 this month | |
end | |
end |
class CustomerTest | |
test 'get a list of all customers who have spent over £100 this month' do | |
create_list(:customer, 10, :spent_over_100_pounds) | |
create_list(:customer, 10, :spent_less_than_100_pounds) | |
assert_equal 10, Customer.active.size | |
end | |
end |
"Max likes this" | |
"Max, Adam and Steve like this" | |
Is there a prebuilt function to decide which form of `like` to use? |
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"create_window_at_startup": false, | |
"default_line_ending": "unix", | |
"font_face": "Anonymous Pro", | |
"font_size": 15, | |
"ignored_packages": | |
[ | |
"Theme - Flatland", |
{ | |
"featureType": "poi.park", | |
"stylers": [ | |
{ "color": "#AEB364" } | |
] | |
},{ | |
"featureType": "road", | |
"elementType": "geometry", | |
"stylers": [ |
Rails.application.routes.draw do | |
api_read_actions = [:index, :show] | |
api_resources = [:videos, :people, :collections] | |
api_resources.each do |api_resource| | |
resources api_resource, only: api_read_actions | |
end | |
end |
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", | |
"create_window_at_startup": false, | |
"default_line_ending": "unix", | |
"font_face": "Anonymous Pro", | |
"font_size": 18, | |
"ignored_packages": | |
[ | |
"Theme - Flatland", |
I hereby claim:
To claim this, I am signing this object:
#import <Foundation/Foundation.h> | |
@interface NSNumber (SUBNumberAdditions) | |
- (NSDate *)sub_DateFromMilitaryTime; | |
- (BOOL)sub_isValidMilitaryTime; | |
@end |
- (NSDate *)sub_DateFromMilitaryTime { | |
NSDate *newDate; | |
NSDateComponents *comps = [[NSDateComponents alloc] init]; | |
[comps setMinute:[self intValue] % 100]; | |
[comps setHour:floor(self.intValue / 100)]; | |
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; | |
newDate = [gregorian dateFromComponents:comps]; | |
return newDate; | |
} |