Instantly share code, notes, and snippets.

View Arduino-Blink.ino
View Google+ Comments in Blogger.html
<!-- Google+ Comments -->
<div class='cmt_iframe_holder'
expr:data-href='data:post.canonicalUrl'
expr:data-viewtype='data:post.viewType'/>
View Redacted.rb
# Ruby Getting Started with Programming
# A Codecademy Ruby (Redacted) assignment
# Dr. Steven B. Combs, coding novice
puts "Text to search through: " #Puts text
text = gets.chomp #Request input and "chomp" return
puts "Word to redact: " #Puts text
redact = gets.chomp #Request second input and "chomp" return
words = text.split (" ") #Splits the input into words at each space
View ControlFlows.rb
# Ruby Getting Started with Programming
# Control flow examples
# Dr. Steven B. Combs, coding novice
# Do
puts "Do"
10.times do
print "Hello. "
end
puts ""
View ThithMeanthWar.rb
# Ruby Getting Started with Programming
# A Codecademy Ruby (Thith Meanth War!) assignment
# Dr. Steven B. Combs, coding novice
print "Thtring pleathe: " # Print request for input
user_input = gets.chomp # Capture input and remove default extra line (.chomp)
user_input.downcase! # Change input to all lowercase and replace variable content
if user_input.include? "s" # If the input inlcludes an 's'
user_input.gsub!(/s/, "th") # Perform a global substitution of every 's' with 'th'
print "Your new sting is #{user_input}." # Print string including the new value
View BuildAPersonalWebSite.html
<!DOCTYPE html>
<head>
<title>Anna Dowlin</title>
<style>
body {
text-align: center;
background: url("http://dash.ga.co/assets/anna-bg.png");
background-size: cover;
background-position: center;
color: white;
View UnlessControlFlow.rb
# Ruby Getting Started with Programming
# A Codecademy Ruby (Unless) assignment
# Dr. Steven B. Combs, coding novice
hungry = true
unless hungry # tests for false condition
puts "I'm writing Ruby programs!"
else # if not false, but true
puts "Time to eat!"
View FormInFormatter.rb
# Ruby Getting Started with Programming
# A Codecademy Ruby (Putting the Form in Formatter) assignment
# Dr. Steven B. Combs, coding novice
# gets requests user input and the .chomp modifier excludes new/blank line that ruby includes by default
#request input
print "What's your first name?"
first_name = gets.chomp.capitalize! # Replaces first_name variable with first character capitalized version
print "What's your last name?"
View StockingOut.py
# Computer the bill for a shopping list
# A Codecademy Python (Stocking Out) assignment
# Dr. Steven B. Combs, coding novice
shopping_list = ["banana", "orange", "apple", "orange", "apple"]
stock = {
"banana": 6,
"apple": 0,
"orange": 32,
"pear": 15