$ ssh [email protected]
Enter Password: raspberry
$ sudo raspi-config
Choose 'Repurpose entire SD card'
Update apt repositories
$ ssh [email protected]
Enter Password: raspberry
$ sudo raspi-config
Choose 'Repurpose entire SD card'
Update apt repositories
4.times do | |
puts 'Do this four times!' | |
end |
name = 'Max' | |
if name.eql? 'Max' | |
puts 'Hi Max' | |
end |
{ | |
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme", | |
"font_face": "Anonymous Pro", | |
"font_size": 16, | |
"ignored_packages": | |
[], | |
"margin": 2, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, | |
"use_simple_full_screen": true |
function CartController($scope) { | |
$scope.items = [ | |
{ name: 'Fish', quantity: 0, price: 20.00 }, | |
{ name: 'Chips', quantity: 0, price: 0.20 } | |
]; | |
$scope.total = function() { | |
var total = 0; | |
for(var i = 0; i < $scope.items.length; i++) { | |
total = total + ($scope.items[i].quantity * $scope.items[i].price); |
module.exports = (robot) -> | |
robot.respond /who should make tea\??/i, (msg) -> | |
msg.send "@SamKnight should make tea" |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
#import "Kiwi.h" | |
#import "RPNStack.h" | |
SPEC_BEGIN(RPNStackSpec) | |
describe(@"The stack", ^{ | |
context(@"when created", ^{ | |
RPNStack *stack = [[RPNStack alloc] init]; | |
it(@"is not nil.", ^{ | |
[[stack shouldNot] beNil]; |
- (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; | |
} |
#import <Foundation/Foundation.h> | |
@interface NSNumber (SUBNumberAdditions) | |
- (NSDate *)sub_DateFromMilitaryTime; | |
- (BOOL)sub_isValidMilitaryTime; | |
@end |