Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more more more

  • Loading branch information...
commit ed7cb11923fcc28e1e23eac185f828f55312d340 1 parent 76baac1
@heim authored
View
1  .gitignore
@@ -1 +1,2 @@
node_modules
+dump.rdb
View
BIN  public/img/redis.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
40 public/index.html
@@ -537,22 +537,46 @@
---
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
16 public/lib/pres.js
@@ -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'));
Please sign in to comment.
Something went wrong with that request. Please try again.