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 User < ActiveRecord::Base | |
# ... | |
def send_sms(message) | |
twilio = Twilio::REST::Client.new(Rails.application.config.twilio_account_id) | |
args = { | |
to: phone_number, | |
body: message |
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 SMSController < ApplicationController | |
def create | |
user = User.find(params[:id) | |
twilio = Twilio::REST::Client.new(Rails.application.config.twilio_account_id) | |
args = { | |
to: user.phone_number, | |
body: params[:message] | |
} | |
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 Proposition | |
def initialize(sentence) | |
@sentence = sentence | |
end | |
def false? | |
subject.false? | |
end | |
def subject |
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 Proposition | |
def initialize(sentence) | |
@sentence = sentence | |
end | |
def false? | |
subject.false? | |
end | |
def subject |
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 Proposition | |
def initialize(sentence) | |
@sentence = sentence | |
end | |
def false? | |
subject.false? | |
end | |
def subject |
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
// Callbacks | |
// Complete this function so that it passes the numbers 1 and 2 into the callback | |
function two_numbers(callback){ | |
// TODO | |
} | |
two_numbers(function(x, y){ | |
console.log(x, y); | |
} |
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
counterApp.controller('CounterCtrl', function(){ | |
// You'll need to explain this | |
var self = this; | |
// Start with basic two-way data binding | |
self.count = 0; | |
// Now add buttons | |
self.increment = function() { | |
self.count++; |
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
# improve colors | |
set -g default-terminal 'xterm-256color' | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# act like vim | |
setw -g mode-keys vi | |
bind h select-pane -L |
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
Questions | |
# Passion | |
If you studied history, why did you end up becoming a coder? | |
If you could teach yourself to learn to code, why not something else? | |
# Interest | |
Which programmers do you look up to? |
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 "./lib/journey_log" | |
class Oystercard | |
MAXIMUM_BALANCE = 90 | |
MINIMUM_BALANCE = 1 | |
attr_reader :balance, :journey, :journey_log | |
def initialize(journey_log: JourneyLog.new) |
NewerOlder