This file contains hidden or 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
| var sys = require('sys'); | |
| var fs = require('fs'); | |
| var restler = require('restler'); | |
| exports.generate_pdf = function(username, api_key, src_data, res) { | |
| console.log("starting to generate pdf"); | |
| console.log(username); | |
| console.log(api_key); | |
| console.log(src_data); |
This file contains hidden or 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
| var cradle = require('cradle'); | |
| var database = 'app'; | |
| cradle.setup({ | |
| host: '127.0.0.1', | |
| port: 5984, | |
| auth: { username: "YOUR_USERNAME", password: "YOUR_PASSWORD" } | |
| }); |
This file contains hidden or 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
| import mmap | |
| import sys | |
| import struct | |
| def main(in_file, out_file): | |
| with open(in_file, "r+b") as f: | |
| map = mmap.mmap(f.fileno(), 0) | |
| data = map.readline() | |
| # Assuming first char is \x00 and | |
| # data is in blocks of 3. |
NewerOlder