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
Joe knowles | |
1. Make directory structures: temp/my/files and temp/other/file | |
2. In temp/my/files make a file chrome.txt which contains a list of the last 5 environment variables | |
3. Navigate to temp/my/files then push that directory while navigating to temp/other/file | |
4. Put the number of history entries into a file called my_history.count | |
5. 'pop' back to the temp/my/files | |
6. Install "cowsay" with this command - $ sudo gem install cowsay | |
7. Use cowsay to tell you how many Chrome processes are running | |
8. Save a file called farm.txt with two cowsay animals trying to be entertaining | |
9. Print farm.txt to the screen |
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
#!/usr/bin/env ruby | |
class Manager | |
def pick_a_team(squad) | |
team = Team.new | |
# get the best players for every position from the squad | |
# and add them to the team | |
# for every position (goalkeeper etc) | |
# get the best player(s) from the squad |
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
#!/usr/bin/env ruby | |
class Order | |
def initialize(cake_flavour) | |
puts "----------------->You've initialised a new order for a cake" | |
puts " | |
You want a #{cake_flavour} flavoured cake? |
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
#!/usr/bin/env ruby | |
class Manager | |
def initialize | |
puts "Manager initialised" | |
end | |
def pick_a_team(squad, d, m, a) | |
team = Team.new |
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
class C | |
puts "Just started class C" | |
puts self | |
module M | |
puts "Nested module C::M" | |
puts self | |
end | |
puts "back in the outer level of C:" |
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
#!/usr/bin/env ruby | |
class Order | |
def initialize(cake_flavour) | |
puts "----------------->You've initialised a new order for a cake" | |
puts " | |
You want a #{cake_flavour} flavoured cake? |
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
class Car | |
#CLASS LEVEL VARIABLES AND METHODS | |
@@makes = [] | |
@@cars = {} | |
def self.total_count #ATTRIBUTE READER | |
@total_count ||= 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
{ | |
"color_scheme": "Packages/Color Scheme - Default/jordan.tmTheme", | |
"command": "save_all", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 10.0, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"keys": |
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
Show hidden characters
[ | |
/* BEGIN: blockers */ | |
{ "keys": ["alt+a"], "command": "insert_snippet", "args": {"contents": "=>"} }, | |
{ "keys": ["alt+s"], "command": "insert_snippet", "args": {"contents": "."} }, | |
{ "keys": ["alt+d"], "command": "insert_snippet", "args": {"contents": "/"} }, | |
{ "keys": ["alt+f"], "command": "insert_snippet", "args": {"contents": ";"} }, | |
{ "keys": ["alt+g"], "command": "insert_snippet", "args": {"contents": ":"} }, | |
{ "keys": ["alt+h"], "command": "insert_snippet", "args": {"contents": "\"$0\""} }, | |
{ "keys": ["alt+j"], "command": "insert_snippet", "args": {"contents": "[$0]"} }, | |
{ "keys": ["alt+k"], "command": "insert_snippet", "args": {"contents": "{$0}"} }, |
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
# 12 slots, 2 for winners, 1 for teachers, 7 cohort one, 4 in cohort 2 | |
cohort_1 = [:Michelle, :Max, :Jordan, :Pat, :Vish, :Rich, :Alex, :Mark] | |
benched = [:RobB, :Chris] | |
cohort_2 = [:Zahid, :Aled, :Dario, :Sam, :Ruben] | |
teachers = [:Evgeny, :Leo, :RobJ, :Ben, :Ana ] | |
everyone = cohort_1 + benched + cohort_2 + teachers |
OlderNewer