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
Sphero Workshop | |
=============== | |
The goal of the workshop is to introduce basic programming and logic concepts through fun activities with Sphero. | |
Technology | |
---------- | |
We use Ruby and Macrolab depending on age and prior programming experience. We have mobile devices (iPads, iPad minis, Nexus 7 tablets) to run the Macrolab application. We have Mac Books with Ruby 1.9.3 for Ruby programming with Sphero for older kids and those with more experience and/or interest in Ruby development. |
This file has been truncated, but you can view the full file.
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
Script started on Tue Feb 4 10:19:40 2014 | |
[?1034hbash-3.2$ ls | |
Vagrantfile Vagrantfile~ package.box typescript | |
bash-3.2$ vagrant up --debug | |
INFO global: Vagrant version: 1.4.3 | |
INFO global: Ruby version: 2.0.0 | |
INFO global: RubyGems version: 2.0.14 | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded" | |
INFO global: VAGRANT_INSTALLER_VERSION="2" | |
INFO global: VAGRANT_DETECTED_OS="Darwin" |
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
Script started on Mon Feb 10 13:32:30 2014 | |
Identity added: /Users/afowleswinkler/.ssh/id_rsa_afowles_oracle (/Users/afowleswinkler/.ssh/id_rsa_afowles_oracle) | |
[?1034hbash-3.2$ ls | |
Vagrantfile typescript | |
bash-3.2$ vagrant up --debug | |
INFO global: Vagrant version: 1.4.3 | |
INFO global: Ruby version: 2.0.0 | |
INFO global: RubyGems version: 2.0.14 | |
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded" | |
INFO global: VAGRANT_INSTALLER_VERSION="2" |
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
# | |
# This file demonstrates a Caesar cipher | |
# There is an encrypt function for encoding plaintext into ciphertext | |
# and a decrypt function for converting ciphertext into plaintext | |
# | |
# given plaintext and key, return encoded ciphertext | |
def encrypt(plaintext, key, letters) | |
plaintext_as_numbers = [] | |
# Represent each plaintext letter as a corresponding number |
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
# | |
# This file demonstrates FizzBuzz in Ruby | |
# | |
(1..20).each do |number| | |
puts "Checking #{number}" | |
puts "FIZZ" if number % 3 == 0 | |
puts "BUZZ" if number % 5 == 0 | |
end |
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
def decrypt( ciphertext, key ): | |
""" given ciphertext and key, return decoded plaintext""" | |
# Represent each plaintext letter as a corresponding number | |
# for example a=>0, b=>1, ... y=>25, z=>26, '<space>'=>27 | |
ciphertext_as_numbers = [] | |
for l in ciphertext.lower(): | |
ciphertext_as_numbers.append( letters.index(l) ) | |
# encryption... Ceaser cipher shift |
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
def decrypt(ciphertext, key, letters) | |
# Represent each plaintext letter as a corresponding number | |
# for example a=>0, b=>1, ... y=>25, z=>26, '<space>'=>27 | |
ciphertext_as_numbers = [] | |
ciphertext.downcase.each_char do |l| | |
ciphertext_as_numbers << letters.index(l) | |
end | |
# encryption... Caesar cipher shift | |
# add the key to each number and mod by 27 |
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
bundle exec ruby start.rb haproxy.cfg.simple | |
bundle exec ruby start.rb haproxy.cfg.group_example | |
bundle exec ruby start.rb haproxy.cfg.server_error_pages |
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
For the mac - try installing the driver: http://www.ftdichip.com/Drivers/VCP.htm | |
Install the Adafruit Arduino: | |
- Open the mac *.gz file | |
- Drag the app to applications | |
- Open Adafruit Arduino | |
- You might need to install Java - click more info & download & install Java | |
- Copy contents of the holiday GSA\Arduino to Documents\Arduino | |
Set the board type: |
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
Want to learn more? | |
* The Ruby website https://www.ruby-lang.org/en/ | |
* Ruby gems (libraries) https://rubygems.org/ | |
* Ruby Documentation http://ruby-doc.org/ | |
* Article Ruby Gems for Command-Line Apps: http://www.awesomecommandlineapps.com/gems.html | |
Online Learning | |
* Code Academy Ruby - http://www.codecademy.com/en/tracks/ruby | |
* Programming Ruby - http://ruby-doc.com/docs/ProgrammingRuby/ |
OlderNewer