Permalink
Browse files

more more more

  • Loading branch information...
heim committed Nov 5, 2013
1 parent 76baac1 commit ed7cb11923fcc28e1e23eac185f828f55312d340
Showing with 42 additions and 15 deletions.
  1. +1 −0 .gitignore
  2. BIN public/img/redis.png
  3. +32 −8 public/index.html
  4. +9 −7 public/lib/pres.js
View
@@ -1 +1,2 @@
node_modules
+dump.rdb
View
Binary file not shown.
View
@@ -537,22 +537,46 @@ <h1><span>Praksis</span></h1>
---
name: redis-term
-class: cols white
+class: cols three white
# <span>Redis</span>
-
<div id="redis-term"></div>
-
<div style="clear: both"></div>
+<div class="col">
+ <h3><span>Lister</span></h3>
+ <a href="#" class="redis-cmd">lpush protagonists 'trevor'</a><br />
+ <a href="#" class="redis-cmd">lpush protagonists 'michael'</a><br />
+ <a href="#" class="redis-cmd">lpush protagonists 'franklin'</a><br />
+ <a href="#" class="redis-cmd">llen protagonists</a><br />
+ <a href="#" class="redis-cmd">lrange protagonists 0 -1</a><br />
+ <a href="#" class="redis-cmd">lindex protagonists 2</a><br />
+ <a href="#" class="redis-cmd">lrem protagonists 1 'franklin'</a><br />
+ <a href="#" class="redis-cmd">lpop protagonists</a><br />
+ <a href="#" class="redis-cmd">rpoplpush protagonists antagonists</a><br />
+ <a href="#" class="redis-cmd">lrange antagonists 0 -1</a><br />
+</div>
+<div class="col">
+ <h3><span>Set</span></h3>
+ <a href="#" class="redis-cmd">sadd prot 'franklin'</a><br />
+ <a href="#" class="redis-cmd">sadd prot 'michael'</a><br />
+ <a href="#" class="redis-cmd">scard prot</a><br />
+ <a href="#" class="redis-cmd">smembers prot</a><br />
+ <a href="#" class="redis-cmd">sadd ant 'trevor'</a><br />
+ <a href="#" class="redis-cmd">sunion prot ant</a><br />
+ <a href="#" class="redis-cmd">smembers ant</a><br />
+ <a href="#" class="redis-cmd">sunionstore characters prot ant</a><br />
+ <a href="#" class="redis-cmd">smembers characters</a><br />
+</div>
+
+<div class="col">
+ <ul id="redis-list"></ul>
+</div>
+
+<a href="#" class='pushed' id="resume">Resume</a>
-<ul id="redis-list"></ul>
-<p>
- <a href="#" id="resume">Resume</a>
- <a href="#" class="redis-cmd" data-command="foo">ls</a>
-</p>
---
View
@@ -17,6 +17,15 @@ var processed = [];
window.onload = function() {
var socket = io.connect();
+
+ $('.redis-cmd').click(function (e) {
+ var command = $(e.target).text();
+ console.log(command);
+ //redis_term.write(command);
+ socket.emit('redis-term', command + "\r");
+ e.preventDefault();
+ });
+
socket.on('connect', function() {
var redis_term = new Terminal({
cols: 80,
@@ -29,13 +38,6 @@ window.onload = function() {
socket.emit('redis-term', data);
});
- $('.redis-cmd').click(function (e) {
- var command = $(e.target).data('command');
- console.log(command);
- redis_term.write(command);
- socket.emit('redis-term', command);
- e.preventDefault();
- });
redis_term.open(document.getElementById('redis-term'));

0 comments on commit ed7cb11

Please sign in to comment.