I hereby claim:
- I am joscas on github.
- I am jcasals (https://keybase.io/jcasals) on keybase.
- I have a public key ASDrajF6JtU_UxlAyR-Ia6APWIdaJ5kbFp9OK8madljL6go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* Author: Nick Johnson <arachnid at notdot.net> | |
* | |
* WARNING: This contract is new and thus-far only lightly tested. I'm fairly | |
* confident it operates as described, but you may want to assure yourself of | |
* its correctness - or wait for others to do so for you - before you trust your | |
* ether to it. No guarantees, express or implied, are provided - use at your | |
* own risk. | |
* | |
* @dev Ether vault contract. Stores ether with a 'time lock' on withdrawals, |
#!/bin/bash | |
cqlsh <<CQL | |
USE chat_app; | |
INSERT INTO chat_messages (from_user, to_user, time, body, class, message_id ) | |
VALUES ( 'john', 'mike', now(), 'Hi Mike!', 'family', blobAsUuid(timeuuidAsBlob(now()))) ; | |
INSERT INTO chat_messages (from_user, to_user, time, body, class, message_id ) | |
VALUES ( 'mike', 'john', now(), 'Hi John!', 'family', blobAsUuid(timeuuidAsBlob(now()))) ; | |
INSERT INTO chat_messages (from_user, to_user, time, body, class, message_id ) | |
VALUES ( 'john', 'mike', now(), 'How are you?', 'family', blobAsUuid(timeuuidAsBlob(now()))) ; | |
INSERT INTO chat_messages (from_user, to_user, time, body, class, message_id ) |
#!/bin/bash | |
cqlsh <<CQL | |
CREATE KEYSPACE chat_app WITH REPLICATION = {'class':'SimpleStrategy', 'replication_factor':1}; | |
USE chat_app; | |
CREATE TABLE chat_messages ( | |
message_id uuid, | |
from_user text, | |
to_user text, | |
body text, | |
class text, |
#!/usr/bin/env ruby | |
# Lean Architecture example in Ruby - with ContextAccessor | |
# This example keeps interaction state in a "current context", represented | |
# by a ContextAccessor module. This can be mixed in to any class that needs | |
# access to the current context. It is implemented as a thread-local variable. | |
module ContextAccessor | |
def context | |
Thread.current[:context] |