Skip to content

Instantly share code, notes, and snippets.

from flask import Flask, request
from twilio.twiml.messaging_response import MessagingResponse
from random import randint
app = Flask(__name__)
@app.route('/sms', methods=['POST'])
@sphuff
sphuff / composition.lua
Created February 11, 2017 04:00
Example of object composition in Lua
-- Generic function declarations
local Barker = {
barks = function(self)
print(self.name .. ' barks')
end
}
local Killer = {
kills = function(self, target)
print(self.name .. ' kills '.. target .. ' with its '.. self.weapon)