Skip to content

Instantly share code, notes, and snippets.

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)
``` 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)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>assignto</key>
<array>
<dict>
<key>command</key>
<integer>9000</integer>
<key>enabled</key>
[
{ //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"
[
{ //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"
[
{ //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"
db.put({
_id: 'mydoc',
title: 'Heroes'
}, function(err, response) {
if (err) {
console.log(err);
}
});
@Darkle
Darkle / .js
Created December 4, 2015 04:27
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),
@Darkle
Darkle / index.html
Last active December 18, 2015 05:46 — forked from nolanlawson/index.html
PouchDB Quick Search demo
<html>
<head>
<style>
#display{
max-width: 900px;
overflow: scroll;
}
</style>
</head>
<body>
<html>
<body>
<pre id="display"></pre>
<script src="//cdn.jsdelivr.net/pouchdb/5.1.0/pouchdb.min.js"></script>
</body>
</html>