- Find your Flowdock token from https://www.flowdock.com/help/travis-ci
gem install travis
travis encrypt -r <github-user>/<repo-name> <flowdock-token>
- Add the following to
.travis.yml
notifications:
# Straight Virtus | |
attribute :invoice_date, DateTime, default: :_invoice_date | |
attribute :invoice_number, String, default: :_invoice_number | |
attribute :invoice_amount, RowParser::Attributes::Money, default: :_invoice_amount | |
attribute :invoice_currency_code, String, default: :_invoice_currency_code | |
# Connections DSL | |
# multiple attribute connections | |
connect_attributes do |
Started GET "/" for 127.0.0.1 at 2014-02-20 22:43:21 -0800 | |
Processing by WebsiteController#index as HTML | |
Rendered text template (0.0ms) | |
Completed 200 OK in 2.3ms (Views: 1.9ms | ActiveRecord: 0.0ms) | |
some_method from shared logic | |
some_method from overridden in website controller |
gem install travis
travis encrypt -r <github-user>/<repo-name> <flowdock-token>
.travis.yml
notifications:
require "benchmark" | |
require "gc_tracer" | |
include Process | |
class WithLiteral | |
def call | |
[] | |
end | |
end |
An article I was asked to write for the UNR Extended Studies newletter in support of this class: Introduction to Programming
Why programming? Why learn programming?
"They say that in Thailand there is a different Pad Thai recipe for every cook." — Alton Brown[1]
Like Pad Thai recipes, every programmer has their own answer to "why programming?" and that answer changes over time. I've always enjoyed solving problems. The rush that comes with the solution is hard to beat. The more challenging the problem, the bigger the reward. Take a gnarly issue, break it down, work it through, repeat for days, and then figure it out. Do you feel that? Cheer! Dance!
# Remember: use `ruby exercise3.rb` to run this file | |
# 1. display the contents of the `my_variable` variable | |
my_variable = "100" | |
# 2. assign the integer 5 to a variable named 'number' | |
# 3. display the contents of the 'number' variable | |
# 4. change (coerce) the string in 'my_variable' into an integer |
module A | |
def a_method | |
puts "a method" | |
end | |
end | |
# => :a_method | |
class B | |
extend A | |
def b_method |
# Remember: use `ruby exercise4.rb` to run this file | |
# 1. display the contents of the `my_variable` variable | |
my_variable = "100" | |
# 2. assign the integer 5 to a variable named 'number' | |
# 3. display the contents of the 'number' variable | |
# 4. create an array with the values 1, 2, 4, and 5, assign it to a variable named `numbers` |
# original data | |
# https://www.cisweb1.unr.edu/cxs/CourseListing.asp?master_id=1955&course_area=BASE&course_number=105&course_subtitle=00 | |
data = File.read("data.txt") | |
lines = data.split("\n") | |
def extract_value_from_line(line, delimiter = ":") | |
line.split(delimiter)[1].to_s.strip | |
end |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowGroupToSeeBucketListInTheConsole", | |
"Action": [ | |
"s3:ListAllMyBuckets", | |
"s3:GetBucketLocation" | |
], | |
"Effect": "Allow", |