Skip to content
This repository was archived by the owner on Apr 18, 2023. It is now read-only.

Commit c0929ce

Browse files
committed
Add day 1 morning slides, notes, etc.
1 parent eb0f525 commit c0929ce

File tree

232 files changed

+44917
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+44917
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*~
22
*.swp
3+
4+
node_modules
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
puts 'hello world'
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
SECONDS_IN_MINUTE = 60
2+
MINUTES_IN_HOURS = 60
3+
4+
def seconds_in_minutes(minutes)
5+
SECONDS_IN_MINUTE * minutes
6+
end
7+
8+
def seconds_in_hours(hours)
9+
seconds_in_minutes(MINUTES_IN_HOURS) * hours
10+
end
11+
12+
print 'How many hours? '
13+
14+
# read input from the user and strip whitespace
15+
hours = gets.chomp
16+
17+
result = seconds_in_hours(hours.to_i)
18+
19+
puts "There are #{result} seconds in #{hours} hours!"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'sinatra'
4+
5+
gem 'ruby_cowsay'
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
mustermann (1.0.0)
5+
rack (2.0.2)
6+
rack-protection (2.0.0)
7+
rack
8+
ruby_cowsay (0.1.2)
9+
sinatra (2.0.0)
10+
mustermann (~> 1.0)
11+
rack (~> 2.0)
12+
rack-protection (= 2.0.0)
13+
tilt (~> 2.0)
14+
tilt (2.0.7)
15+
16+
PLATFORMS
17+
ruby
18+
19+
DEPENDENCIES
20+
ruby_cowsay
21+
sinatra
22+
23+
BUNDLED WITH
24+
1.14.6
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
require 'sinatra'
2+
require 'ruby_cowsay'
3+
require './second_calculator'
4+
5+
get '/' do
6+
'check out /hello'
7+
end
8+
9+
get '/ruby-class' do
10+
'HELLO RUBY CLASS'
11+
end
12+
13+
get '/seconds_in_minutes/:minutes' do
14+
calc = SecondCalculator.new
15+
16+
minutes = params['minutes'].to_i
17+
result = calc.seconds_in_minutes(params['minutes'].to_i)
18+
19+
"There are #{result} seconds in #{minutes}!"
20+
end
21+
22+
get '/cowsay/:text' do
23+
text = Cow.new.say(params['text'])
24+
25+
erb :cowsay, locals: {
26+
cow_said: text
27+
}
28+
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class SecondCalculator
2+
SECONDS_IN_MINUTES = 60
3+
MINUTES_IN_HOURS = 60
4+
5+
def seconds_in_minutes(minutes)
6+
SECONDS_IN_MINUTES * minutes
7+
end
8+
9+
def seconds_in_hours(hours)
10+
seconds_in_minutes(MINUTES_IN_HOURS) * hours
11+
end
12+
end
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<html>
2+
<head>
3+
<title>COWSAY WOOOOO</title>
4+
<style>
5+
pre {
6+
font-size: 30px;
7+
}
8+
</style>
9+
</head>
10+
11+
<body>
12+
<pre>
13+
<%= cow_said %>
14+
</pre>
15+
</body>
16+
</html>

slides/01-ruby-intro/CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Contributing
2+
3+
Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**.
4+
5+
6+
### Personal Support
7+
If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js).
8+
9+
10+
### Bug Reports
11+
When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested.
12+
13+
14+
### Pull Requests
15+
- Should follow the coding style of the file you work in, most importantly:
16+
- Tabs to indent
17+
- Single-quoted strings
18+
- Should be made towards the **dev branch**
19+
- Should be submitted from a feature/topic branch (not your master)
20+
21+
22+
### Plugins
23+
Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines

slides/01-ruby-intro/Gruntfile.js

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
/* global module:false */
2+
module.exports = function(grunt) {
3+
var port = grunt.option('port') || 8000;
4+
var root = grunt.option('root') || '.';
5+
6+
if (!Array.isArray(root)) root = [root];
7+
8+
// Project configuration
9+
grunt.initConfig({
10+
pkg: grunt.file.readJSON('package.json'),
11+
meta: {
12+
banner:
13+
'/*!\n' +
14+
' * reveal.js <%= pkg.version %> (<%= grunt.template.today("yyyy-mm-dd, HH:MM") %>)\n' +
15+
' * http://lab.hakim.se/reveal-js\n' +
16+
' * MIT licensed\n' +
17+
' *\n' +
18+
' * Copyright (C) 2017 Hakim El Hattab, http://hakim.se\n' +
19+
' */'
20+
},
21+
22+
qunit: {
23+
files: [ 'test/*.html' ]
24+
},
25+
26+
uglify: {
27+
options: {
28+
banner: '<%= meta.banner %>\n'
29+
},
30+
build: {
31+
src: 'js/reveal.js',
32+
dest: 'js/reveal.min.js'
33+
}
34+
},
35+
36+
sass: {
37+
core: {
38+
files: {
39+
'css/reveal.css': 'css/reveal.scss',
40+
}
41+
},
42+
themes: {
43+
files: [
44+
{
45+
expand: true,
46+
cwd: 'css/theme/source',
47+
src: ['*.sass', '*.scss'],
48+
dest: 'css/theme',
49+
ext: '.css'
50+
}
51+
]
52+
}
53+
},
54+
55+
autoprefixer: {
56+
dist: {
57+
src: 'css/reveal.css'
58+
}
59+
},
60+
61+
cssmin: {
62+
compress: {
63+
files: {
64+
'css/reveal.min.css': [ 'css/reveal.css' ]
65+
}
66+
}
67+
},
68+
69+
jshint: {
70+
options: {
71+
curly: false,
72+
eqeqeq: true,
73+
immed: true,
74+
esnext: true,
75+
latedef: true,
76+
newcap: true,
77+
noarg: true,
78+
sub: true,
79+
undef: true,
80+
eqnull: true,
81+
browser: true,
82+
expr: true,
83+
globals: {
84+
head: false,
85+
module: false,
86+
console: false,
87+
unescape: false,
88+
define: false,
89+
exports: false
90+
}
91+
},
92+
files: [ 'Gruntfile.js', 'js/reveal.js' ]
93+
},
94+
95+
connect: {
96+
server: {
97+
options: {
98+
port: port,
99+
base: root,
100+
livereload: true,
101+
open: true
102+
}
103+
},
104+
105+
},
106+
107+
zip: {
108+
'reveal-js-presentation.zip': [
109+
'index.html',
110+
'css/**',
111+
'js/**',
112+
'lib/**',
113+
'images/**',
114+
'plugin/**',
115+
'**.md'
116+
]
117+
},
118+
119+
watch: {
120+
js: {
121+
files: [ 'Gruntfile.js', 'js/reveal.js' ],
122+
tasks: 'js'
123+
},
124+
theme: {
125+
files: [
126+
'css/theme/source/*.sass',
127+
'css/theme/source/*.scss',
128+
'css/theme/template/*.sass',
129+
'css/theme/template/*.scss'
130+
],
131+
tasks: 'css-themes'
132+
},
133+
css: {
134+
files: [ 'css/reveal.scss' ],
135+
tasks: 'css-core'
136+
},
137+
html: {
138+
files: root.map(path => path + '/*.html')
139+
},
140+
markdown: {
141+
files: root.map(path => path + '/*.md')
142+
},
143+
options: {
144+
livereload: true
145+
}
146+
},
147+
148+
retire: {
149+
js: ['js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js'],
150+
node: ['.'],
151+
options: {}
152+
}
153+
154+
});
155+
156+
// Dependencies
157+
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
158+
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
159+
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
160+
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
161+
grunt.loadNpmTasks( 'grunt-contrib-watch' );
162+
grunt.loadNpmTasks( 'grunt-sass' );
163+
grunt.loadNpmTasks( 'grunt-contrib-connect' );
164+
grunt.loadNpmTasks( 'grunt-autoprefixer' );
165+
grunt.loadNpmTasks( 'grunt-zip' );
166+
grunt.loadNpmTasks( 'grunt-retire' );
167+
168+
// Default task
169+
grunt.registerTask( 'default', [ 'css', 'js' ] );
170+
171+
// JS task
172+
grunt.registerTask( 'js', [ 'jshint', 'uglify', 'qunit' ] );
173+
174+
// Theme CSS
175+
grunt.registerTask( 'css-themes', [ 'sass:themes' ] );
176+
177+
// Core framework CSS
178+
grunt.registerTask( 'css-core', [ 'sass:core', 'autoprefixer', 'cssmin' ] );
179+
180+
// All CSS
181+
grunt.registerTask( 'css', [ 'sass', 'autoprefixer', 'cssmin' ] );
182+
183+
// Package presentation to archive
184+
grunt.registerTask( 'package', [ 'default', 'zip' ] );
185+
186+
// Serve presentation locally
187+
grunt.registerTask( 'serve', [ 'connect', 'watch' ] );
188+
189+
// Run tests
190+
grunt.registerTask( 'test', [ 'jshint', 'qunit' ] );
191+
192+
};

slides/01-ruby-intro/LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (C) 2017 Hakim El Hattab, http://hakim.se, and reveal.js contributors
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

0 commit comments

Comments
 (0)