代码拉取完成,页面将自动刷新
#!/usr/bin/env ruby
# Exit early if sessions with my username are found
exit if `who -q`.include? ENV['USER']
require 'dotenv'
require 'twilio-ruby'
Dotenv.load
TWILIO_ACCOUNT_SID = ENV['TWILIO_ACCOUNT_SID']
TWILIO_AUTH_TOKEN = ENV['TWILIO_AUTH_TOKEN']
@twilio = Twilio::REST::Client.new TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN
# Phone numbers
my_number = '+xxx'
number_of_boss = '+xxx'
excuse = [
'Locked out',
'Pipes broke',
'Food poisoning',
'Not feeling well'
].sample
# Send a text message
@twilio.messages.create(
from: my_number, to: number_of_boss,
body: "Gonna work from home. #{excuse}"
)
# Log this
puts "Message sent at: #{Time.now} | Excuse: #{excuse}"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。