class A < B; def self.create(object = User)
class Zebra; def inspect; "X#{2 + self.object_id}"
module ABC::DEF
include Comparable
# @param test
# @return [String] nothing
def foo(test)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` ruby | |
class A < B; def self.create(object = User) | |
class Zebra; def inspect; "X#{2 + self.object_id}" | |
module ABC::DEF | |
include Comparable | |
# @param test | |
# @return [String] nothing | |
def foo(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ //first object containing array of results (results are in the rows property) | |
"total_rows": 5, | |
"offset": 0, | |
"rows": [ | |
{ | |
"id": "http://hackurls.com/", | |
"key": "http://hackurls.com/", | |
"value": { | |
"rev": "3-545163c9f59fc028edca0080f32a25af" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ //first object containing array of results (results are in the rows property) | |
"total_rows": 5, | |
"offset": 0, | |
"rows": [ | |
{ //First document | |
"id": "http://hackurls.com/", | |
"key": "http://hackurls.com/", | |
"value": { | |
"rev": "3-545163c9f59fc028edca0080f32a25af" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ //first object containing array of results (results are in the rows property) | |
"total_rows": 5, | |
"offset": 0, | |
"rows": [ | |
{ //first document | |
"id": "http://hackurls.com/", | |
"key": "http://hackurls.com/", | |
"value": { | |
"rev": "3-545163c9f59fc028edca0080f32a25af" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.put({ | |
_id: 'mydoc', | |
title: 'Heroes' | |
}, function(err, response) { | |
if (err) { | |
console.log(err); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function process(chunks, index) { | |
var chunk = chunks[index]; | |
if (_.isUndefined(chunk)) { | |
return; | |
}; | |
console.log('doing expensive work ' + _.last(chunk)); | |
_.defer(_.partial(process, chunks, ++index)); | |
} | |
var collection = _.range(10000), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
#display{ | |
max-width: 900px; | |
overflow: scroll; | |
} | |
</style> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<pre id="display"></pre> | |
<script src="//cdn.jsdelivr.net/pouchdb/5.1.0/pouchdb.min.js"></script> | |
</body> | |
</html> |
OlderNewer