Skip to content

Instantly share code, notes, and snippets.

View gr2m's full-sized avatar
🧚
automatin'

Gregor Martynus gr2m

🧚
automatin'
View GitHub Profile
@gr2m
gr2m / $ brew --config
Created June 11, 2012 10:40
debug gists for $ brew install couchdb
HOMEBREW_VERSION: 0.9
HEAD: 26b753f72f329c2343342a46d8480b02be607ab1
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.7.4
Kernel Architecture: x86_64
Xcode: 4.3.2
GCC-4.0: N/A
GCC-4.2: N/A
@gr2m
gr2m / dream-gr2m.js
Created October 27, 2012 19:26
JavaScript Dream Code: share.js
// 1. I share my todoList with its todos
// And email with a Link containing a secret share key will
// be sent to spouse@example.com
var share = new Share()
share.insert('todolist', todoList)
share.insert('todo', [todo1, todo2, todo3])
share.invite('spouse@example.com' )
share.publish()
.fail( function(error) { /* handle error */ } )
.done( function() {} )
@gr2m
gr2m / dabblet.css
Created November 9, 2012 11:42
Untitled
body, html {
padding: 0;
margin: 0;
height: 100%;
font-family: "Impact";
color: rgba(0,0,0,.1)
}
div {
position: relative;
width: 100%;
@gr2m
gr2m / dabblet.css
Created November 9, 2012 13:07
Untitled
body, html {
padding: 0;
margin: 0;
height: 100%;
font-family: "Impact";
color: rgba(0,0,0,.2)
}
div {
position: relative;
width: 100%;
@gr2m
gr2m / dabblet.css
Created November 9, 2012 15:20
Untitled
body, html {
padding: 0;
margin: 0;
height: 100%;
font-family: "Impact";
color: rgba(0,0,0,.2)
}
div {
position: relative;
width: 100%;
@gr2m
gr2m / AfricaHackTrip_recap_3.md
Created November 16, 2012 12:55
3rd recap of the AfricaHackTrip project. Find out more at www.africahacktrip.org

We've made some great progress in the past two weeks, thanks y'all!

  1. New Website online
  2. New timeframe for project + survey
  3. Hackathon on Dec 1st/2nd
  4. First contact with Nairobi
  5. Team meeting on Monday
  6. Vacant team roles
  7. Misc
@gr2m
gr2m / my_fauxton_dream_contributor_workflow.md
Created January 30, 2013 11:53
I started to work on fauxton (https://github.com/cloudant-labs/couchdb/tree/fauxton/src/fauxton) lately, and I found it rather hard to contribute to it. Here's how I'd love the contributor workflow to be.

from zero to hack

$ git clone https://github.com/couchdb/fauxton
$ cd fauxton
$ yeoman install
$ yeoman server

That will start fauxton at http://localhost:3501 and connect automatically to my local couch at http://localhost:5984. Thanks to yeoman, changes in HTML / CSS / JS are visible directly thanks to live reload.

@gr2m
gr2m / account_dreamcode.js
Last active May 7, 2022 08:22
Imagine the typical backend tasks for user authentication would exist right in the browser. How would the code look like? This is what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
// sign up
account.signUp('joe@example.com', 'secret');
// sign in
account.signIn('joe@example.com', 'secret');
// sign in via oauth
account.signInWith('twitter');
// sign out
@gr2m
gr2m / store.dreamcode.js
Last active February 23, 2020 00:03
Imagine saving and finding user data would work right in the browser, persistent and synchronised. How would the code look like? This is what I came up with. Forks & comments much appreciated! #nobackend #dreamcode
// add a new object
var type = 'note';
var attributes = {color: 'red'};
store.add(type, attributes)
.done(function (newObject) {});
.fail(function (error) {});
// update an existing object
var type = 'note';
var id = 'abc4567';
@gr2m
gr2m / share_dreamcode.js
Last active August 29, 2016 09:01
Imagine you could share user data with JavaScript right in the browser. How would the code look like? This is what I came up with. Forks & comments much appreciated! (see also: https://gist.github.com/gr2m/5463475) #nobackend #dreamcode
// add a new share
share = new Share()
// grant / revoke access
share.grantReadAccess()
share.grantWriteAccess()
share.revokeReadAccess()
share.revokeWriteAccess()
share.grantReadAccess('joe@example.com')
share.revomeWriteAccess(['joe@example.com', 'lisa@example.com'])