-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
238 lines (195 loc) · 8.19 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cequel – A full-featured Cassandra ORM for Ruby</title>
<meta name="description" content="Cequel is an object-relational mapper
for the Cassandra database written in Ruby">
<meta name="author" content="Mat Brown">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/simple.css" id="theme">
<link rel="stylesheet" href="lib/css/zenburn.css">
<style type="text/css">
code { height: 15em; }
#typed-cursor{
opacity: 1;
font-weight: 100;
// add prefixes
animation: blink 0.7s infinite;
}
@-keyframes blink{
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
</style>
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write( '<link rel="stylesheet" href="css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<p>Cequel is a full-featured Cassandra ORM for Ruby.</p>
</section>
<section>
<h3>Install it.</h3>
<pre><code>source 'https://rubygems.org'
gem 'rails'
<span class="type">gem 'cequel'</span></code></pre>
</section>
<section>
<h3>Create a model.</h3>
<pre><code><span class="type">class User
include Cequel::Record
key :id, :uuid, auto: true
column :email, :ascii
column :encrypted_password, :ascii
validates :email, :encrypted_password, presence: true
end</span></code></pre>
</section>
<section>
<h3>Migrate automatically.</h3>
<pre><code>$ <span class="type">rake cequel:migrate</span>
<span class="respond">Synchronized schema for User
$ </span></code></pre>
</section>
<section>
<h3>Declare relationships.</h3>
<pre><code>class User
include Cequel::Record
key :id, :uuid, auto: true
column :email, :ascii
column :encrypted_password, :ascii<span class="type">
has_many :messages</span>
validates :email, :encrypted_password, presence: true
end</code></pre>
</section>
<section>
<h3>Declare relationships.</h3>
<pre><code><span class="type">class Message
belongs_to :user
key :id, :timeuuid, auto: true, order: :desc
column :sender_id, :uuid
column :body, :text
end</span></code></pre>
</section>
<section>
<h3>Use relationships.</h3>
<pre><code>class MessagesController < ApplicationController<span class="type">
def index
@messages = current_user.messages.from(1.week.ago).limit(10)
end
def create
User.find(params[:id]).messages.create!(
sender_id: current_user.id,
body: params[:body]
)
end</span>
end</code></pre>
</section>
<section data-duration="4">
<h3>Use it with</h3>
<ul>
<li>Ruby 1.9, 2.0, 2.1</li>
<li>Rails 3, Rails 4, or no Rails</li>
<li>Cassandra 1.2 or 2.0</li>
</ul>
</section>
<section>
<h2><a href="https://github.com/cequel/cequel">Learn more</a></h2>
</section>
</div>
</div>
<a href="https://github.com/cequel/cequel"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://github-camo.global.ssl.fastly.net/a6677b08c955af8400f44c6298f40e7d19cc5b2d/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677261795f3664366436642e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"></a>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="js/typed.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: false,
keyboard: false,
progress: false,
history: false,
center: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'fade', // default/cube/page/concave/zoom/linear/fade/none
transitionSpeed: 'fast',
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
<script type="text/javascript">
$(function () {
$('.type, .respond').each(function () {
var $this = $(this);
$this.data('content', $this.text());
$this.text('');
});
});
Reveal.addEventListener('ready', function () {
setTimeout(Reveal.next, 2000);
});
Reveal.addEventListener('slidechanged', function(event) {
var $currentSlide = $(event.currentSlide);
var animatedSections = $currentSlide.find('.type, .respond')
.toArray();
if (Reveal.isLastSlide()) {
Reveal.configure({
controls: true,
keyboard: true
});
}
var typeNext = function () {
var $section;
if (animatedSections.length === 0) {
duration = parseInt($currentSlide.data('duration') || 2) *
1000;
setTimeout(Reveal.next, duration)
return;
}
console.log(animatedSections);
$section = $(animatedSections.shift());
$('#typed-cursor').remove();
if ($section.is('.type')) {
$section.typed({
strings: [$section.data('content')],
callback: typeNext
});
} else if ($section.is('.respond')) {
$section.text($section.data('content'));
setTimeout(typeNext, 500);
}
};
setTimeout(typeNext, 500);
//console.log(event.currentSlide);
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-7504578-5', 'cequel.github.io');
ga('send', 'pageview');
</script>
</body>
</html>