Skip to content

Instantly share code, notes, and snippets.

View sserrato's full-sized avatar

P. Sergio Serrato sserrato

View GitHub Profile
@sserrato
sserrato / ExportKindle.js
Created August 31, 2020 02:38 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
// The following data should be run in the console while viewing the page https://read.amazon.com/
// It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
var db = openDatabase('K4W', '3', 'thedatabase', 1024 * 1024);
getAmazonCsv = function() {
// Set header for CSV export line - change this if you change the fields used
var csvData = "ASIN,Title,Authors,PurchaseDate\n";
db.transaction(function(tx) {

Keybase proof

I hereby claim:

  • I am sserrato on github.
  • I am pablockchain (https://keybase.io/pablockchain) on keybase.
  • I have a public key ASA5YBoNSW7BCgZ0EcS3CwcwRgZQCNjtnrd76GTFoTrobAo

To claim this, I am signing this object:

@sserrato
sserrato / Binary Search Tree - Ruby
Created June 22, 2019 20:15 — forked from JessyGreben/Binary Search Tree - Ruby
Binary Search Tree - Ruby
class Node
attr_reader :value
attr_accessor :left, :right
def initialize(value=nil)
@value = value
left = nil;
right = nil;
end
end
@sserrato
sserrato / mongoose-cheatsheet.md
Last active August 29, 2015 14:28 — forked from subfuzion/mongoose-cheatsheet.md
mongoose cheatsheet

Definitely not comprehensive. This is meant to be a basic memory aid with links to get more details. I'll add to it over time.

Install

$ npm install mongoose --save

Connect

const mongoose = require('mongoose');